WHAT IS THE COMMON NUMERIC DATA TYPES IN MYSQL

Jonas Stuart

Total Post:26

Points:130
Posted by  Jonas Stuart
MYSQL 
 273  View(s)
Ratings:
Rate this:
  1. Jonas Stuart

    Post:26

    Points:130
    What is the common numeric data types in Mysql

    The following are the common numeric data types: 


    a)TINYINT- A small integer that can be unsigned or signed. You can specify a width of up to 4 digits. If unsigned, the allowable range is from 0 to 255. If signed, the allowable range is from -128 to 127.


    b)INT- A normal-sized integer that can be unsigned or signed. You can specify a width of up to 11 digits. If unsigned, the allowable range is from 0 to 4294967295. If signed, the allowable range is from -2147483648 to 2147483647.


    c)MEDIUMINT - A medium-sized integer that can be unsigned or signed. You can specify a width of up to 9 digits. If unsigned, the allowable range is from 0 to 16777215. If signed, the allowable range is from -8388608 to 8388607.


    d)BIGINT - A large integer that can be unsigned or signed. You can specify a width of up to 20 digits. If unsigned, the allowable range is from 0 to 18446744073709551615. If signed, the allowable range is from -9223372036854775808 to 9223372036854775807.


    e)SMALLINT - A small integer that can be unsigned or signed. You can specify a width of up to 5 digits. If unsigned, the allowable range is from 0 to 65535. If signed, the allowable range is from -32768 to 32767.


    f)BIGINT-- A large integer that can be unsigned or signed. You can specify a width of up to 20 digits. If unsigned, the allowable range is from 0 to 18446744073709551615. If signed, the allowable range is from -9223372036854775808 to 9223372036854775807.


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


    h)FLOAT (M, D) - A floating-point number that cannot be unsigned. Decimal precision can go to 24 places for a FLOAT. You can define the number of decimals (D) and the display length (M). This is not required and will default to 10, 2. 


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


      Modified On Nov-07-2016 12:42:18 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!