// data type reference

DOUBLE PRECISION (FLOAT8)

8 bytes, about 15 digits, the general-purpose float.

Missing in
None of the five
Gotchas
4 listed

Engine by engine

An 8-byte IEEE double in SQL Server, PostgreSQL, MySQL and SQLite; in Oracle the keyword means FLOAT(126), a decimal NUMBER, and the IEEE double is BINARY_DOUBLE.

DOUBLE PRECISION / FLOAT8 in SQL Server, PostgreSQL, MySQL, SQLite and Oracle: type name, storage and notes
엔진 타입 저장소 메모
SQL Server FLOAT (FLOAT(53)) 8 bytes DOUBLE PRECISION is accepted and stored as FLOAT(53); FLOAT(n) is 4 bytes for n 1-24 and 8 bytes for 25-53.
PostgreSQL DOUBLE PRECISION (FLOAT8) 8 bytes 15 decimal digits; FLOAT(p) with 25 <= p <= 53 selects it.
MySQL DOUBLE 8 bytes DOUBLE PRECISION is a synonym; REAL maps to DOUBLE unless REAL_AS_FLOAT mode is set.
SQLite REAL 8 bytes The only float: an 8-byte IEEE double, whatever the declaration said.
Oracle BINARY_DOUBLE 8 bytes Native IEEE double with NaN and infinity; FLOAT(126) is instead the NUMBER-based decimal float.

Gotchas

Where the engines disagree. These tend to surface as bugs during a migration or a port.

  1. In SQLite the declared name is irrelevant: REAL, FLOAT and DOUBLE all produce the same 8-byte double under REAL affinity.
  2. In Oracle, a column declared DOUBLE PRECISION becomes FLOAT(126), a decimal NUMBER, not an IEEE double. Ask for BINARY_DOUBLE when you want 8-byte IEEE behavior, NaN and Inf.
  3. MySQL's REAL follows DOUBLE unless the REAL_AS_FLOAT SQL mode says otherwise, a recurring porting surprise.
  4. SQL Server's FLOAT(1-24) silently shrinks to a 4-byte float; FLOAT with no argument means 53, not 24.

Common questions

REAL or DOUBLE?

DOUBLE for general work: four extra bytes buy 15 digits instead of 7. Choose REAL/FLOAT only for large measured arrays where size matters.

Is DOUBLE PRECISION exact?

No. It is approximate binary floating point: 0.1 has no exact binary form. Use NUMERIC/DECIMAL where exactness is required.

// map types before you move data

Map a type to the other four engines

The free type converter maps a type from one engine to its closest equivalent in the others and says where storage, precision or behaviour differ. The desktop app does the same mapping while you edit.