Numeric Data Types Flashcards
BIT(size) Type? bits per value? Size Parameter? Default?
A bit-value type.
specified insize.
value from 1 to 64.
default value forsizeis 1.
TINYINT(size)
very small integer
signed range -128 to 127
unsigned range 0 to 255
parameter is max display width 255
BOOL
0 is considered as false
nonzero is considered as true
BOOLEAN
Equal to BOOL
SMALLINT(size) Type? bits per value? Size Parameter? Default?
small integer
signed range -32768 to 32767
unsigned range 0 - 65535
parameter is max display width 255
MEDIUMINT(size) Type? bits per value? Size Parameter? Default?
Medium integer
signed range -8388608 to 8388607
unsigned range 0 to 16777215
parameter is max display width 255
INT(size) Type? bits per value? Size Parameter? Default?
medium integer
Signed range -2147483648 to 2147483647
unsigned range 0 to 4294967295
parameter is max display width 255
INTEGER(size) Type? bits per value? Size Parameter? Default?
equal to INT medium integer Signed range -2147483648 to 2147483647 unsigned range 0 to 4294967295 parameter is max display width 255
BIGINT(size) Type? bits per value? Size Parameter? Default?
Large integer
signed range from -9223372036854775808 to 9223372036854775807
unsigned range 0 to 18446744073709551615
parameter is max display width 255
FLOAT(size,d) Type? bits per value? Size Parameter? Default?
Floating point number
total digits specified in size
number of digits after the decimal is specified in the d parameter
being decommissions from SQL
DOUBLES(size,d) Type? bits per value? Size Parameter? Default?
normal size floating point
total digits specified in size
number of digits after decimal place in the D parameter
DECIMAL(size,d) Type? bits per value? Size Parameter? Default?
exact fixed point number
total digits specified in size
number of digits after decimal specified in D parameter
Max size is 65
Max number for D is 30
Default value for size is 10 default value for D is 0
DEC(size,d) Type? bits per value? Size Parameter? Default?
equal to decimal
exact fixed point number
total digits specified in size
number of digits after decimal specified in D parameter
Max size is 65
Max number for D is 30
Default value for size is 10 default value for D is 0
FLOAT(p)
floating point number
SQL uses the P value to determin wether to use FLOAT or DOUBLE for the resulting data type
If p is from 0 to 24 FLOAT is used
If p is from 25 to 53 DOUBLE is used