Connect with us

WEB SOLUTIONS DONE

What are mysql data types and what they mean for

mysql

What are mysql data types and what they mean for

 

 

 

 

 

 

 

 

What are mysql data types and what they mean for 

 

Numeric Data Types

INT:

This is going to be used normally for whole number.A normal-sized integer that can be signed or unsigned. If signed, the
allowable range is from –2147483648 to 2147483647. If unsigned, the allowable
range is from 0 to 4294967295. We can specify a width of up to 11 digits.

TINYINT:

A small integer that can be signed or unsigned. If signed, the allowable
range is from –128 to 127. If unsigned, the allowable range is from 0 to
255. We use it for a  width of up to 4 digits.
SMALLINT:

A small integer that can be signed or unsigned. If signed, the
allowable range is from –32768 to 32767. If unsigned, the allowable range is
from 0 to 65535.We use it for  a width of up to 5 digits.
MEDIUMINT:

A medium-sized integer that can be signed or unsigned. If signed,
the allowable range is from –8388608 to 8388607. If unsigned, the allowable
range is from 0 to 16777215.We use it for a width of up to 9 digits.
BIGINT:

We use it for   a width of up to 11 digits. A large integer that can be signed or unsigned. If signed, the allowable
range is from –9223372036854775808 to 9223372036854775807. If
unsigned, the allowable range is from 0 to 18446744073709551615.

FLOAT(M,D):

We use it for precision and scientific notation. A floating-point number that cannot be unsigned. You can
define the display length (M) and the number of decimals (D). This is not
required and defaults to 10,2, where 2 is the number of decimals and 10 is the
total number of digits (including decimals). Decimal precision can go to 24
places for a FLOAT.
 DOUBLE(M,D):

Decimal precision can go to 53 places for a DOUBLE. REAL is a synonym
for DOUBLE. A double-precision floating-point number that cannot be
unsigned. We can define the display length (M) and the number of decimals
(D). This is not required and will default to 16,4, where 4 is the number of
decimals.
DECIMAL(M,D):

An unpacked floating-point number that cannot be unsigned.
In unpacked decimals, each decimal corresponds to 1 byte. Defining the display
length (M) and the number of decimals (D) is required. NUMERIC is a synonym
for DECIMAL.

Continue Reading
You may also like...

More in mysql

Advertisement




To Top