Search code examples
sqloracle-databaseprecisioncreate-table

Double precision default 0 not null


when creating a table, the following column_definition has been used. Can somebody explain what is the meaning of the first column definition?

Create Table abc_TEMP (column_1 DOUBLE PRECISION DEFAULT 0 Not Null,
....);

Solution

  • You're creating a DOUBLE PRECISION datatype column called column_1 (it's a floating-point number with binary precision 126).

    This column doesn't accept null values explicitly, but if you omit it on an INSERT statement, the number 0 will be set to it.