Slide 19
Slide 19 text
MySQL
has
9
numeric
data
types
ü Compared
to
Oracle's
1
•
Integer:
ü TINYINT
,
SMALLINT,
MEDIUMINT,
INT,
BIGINT
ü Require
8,
16,
24,
32,
and
64
bits
of
space.
•
Use
UNSIGNED
when
you
don't
need
negative
numbers
–
one
more
level
of
data
integrity
•
BIGINT
is
not
needed
for
AUTO_INCREMENT
ü INT
UNSIGNED
stores
4.3
billion
values!
ü Summation
of
values...
yes,
use
BIGINT
Floating
Point:
FLOAT,
DOUBLE
ü Approximate
calculations
•
Fixed
Point:
DECIMAL
ü Always
use
DECIMAL
for
monetary/currency
fields,
never
use
FLOAT
or
DOUBLE!
•
Other:
BIT
ü Store
0,1
values
19
Salaria
Software
Services