Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql numeric data type

BIT(size) -- A bit-value type with a default of 1. The allowed number of bits in a value is set via the size parameter, which can hold values from 1 to 64.

TINYINT(size) -- A very small integer with a signed range of -128 to 127, and an unsigned range of 0 to 255. Here, the size parameter specifies the maximum allowed display width, which is 255.

BOOL -- Essentially a quick way of setting the column to TINYINT with a size of 1. 0 is considered false, whilst 1 is considered true.

BOOLEAN	-- Same as BOOL.

SMALLINT(size) -- A small integer with a signed range of -32768 to 32767, and an unsigned range from 0 to 65535. Here, the size parameter specifies the maximum allowed display width, which is 255.

MEDIUMINT(size) -- A medium integer with a signed range of -8388608 to 8388607, and an unsigned range from 0 to 16777215. Here, the size parameter specifies the maximum allowed display width, which is 255.

INT(size) -- A medium integer with a signed range of -2147483648 to 2147483647, and an unsigned range from 0 to 4294967295. Here, the size parameter specifies the maximum allowed display width, which is 255.

INTEGER(size) -- Same as INT.

BIGINT(size) -- A medium integer with a signed range of -9223372036854775808 to 9223372036854775807, and an unsigned range from 0 to 18446744073709551615. Here, the size parameter specifies the maximum allowed display width, which is 255.

FLOAT(p) -- A floating point number value. If the precision (p) parameter is between 0 to 24, then the data type is set to FLOAT(), whilst if it's from 25 to 53, the data type is set to DOUBLE(). This behaviour is to make the storage of values more efficient.

DOUBLE(size, d) -- A floating point number value where the total digits are set by the size parameter, and the number of digits after the decimal point is set by the d parameter.

DECIMAL(size, d) -- An exact fixed point number where the total number of digits is set by the size parameters, and the total number of digits after the decimal point is set by the d parameter.

DEC(size, d) -- Same as DECIMAL.
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql having 
Sql :: dump sql file to database postgres 
Sql :: hibernate show sql xml property 
Sql :: oracle cpu metric 
Sql :: set engine to innodb 
Sql :: sql trying to delete database in use 
Sql :: azure check access to sql database 
Sql :: union syntax in oracle 
Sql :: get from database the most recent data limit by 5 
Sql :: what is delete in sql 
Sql :: update field in sql to null 
Sql :: mysql regex phone number 
Sql :: many to many flask-sqlalchemy 
Sql :: mysql error the maximum column size is 767 bytes. 
Sql :: oracle disk group space 
Sql :: set a value by excuting stored procedure 
Sql :: insert json file to mssql 
Sql :: pl sql if boolean 
Sql :: reindex mssql table 
Sql :: postgres sql alter table delete row 
Sql :: how to get last element sql 
Sql :: what is between keyword used for 
Sql :: description query in sql 
Sql :: SQL Switch Databases 
Sql :: sqlite get columns for table 
Sql :: sql lowest number possible 
Sql :: data types mysql vs postgresql 
Sql :: sql strip non alphanumeric characters 
Sql :: update database collation in postgresql 
Sql :: mysql update sum same table 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =