डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

Full Stack Web Development with Laravel

Full Stack Web Development with Laravel

Affiliate Program

Affiliate Program

MYSQL datatypes

In MySQL, when we create the table in the database, there we need to write name of the column and specify the data type for that column.
It is very important to choose the right data type for column data.

Numeric data types

  • TINYINT(size): Unsigned range is from 0 to 255, the signed range is from -128 to 127
  • SMALLINT(size): Unsigned range is from 0 to 65535, the signed range is from -32768 to 32767
  • MEDIUMINT(size): Unsigned range is from 0 to 16777215, the signed range is from -8388608 to -8388607
  • INT(size): Signed range is from -2147483648 to 2147483647, Unsigned range is from 0 to 4294967295
  • BIGINT(size): Signed range is from -9223372036854775808 to 9223372036854775807, Unsigned range is from 0 to 18446744073709551615
  • FLOAT(side, d): where d is number of digit after decimal point 
  • DOUBLE(side, d): Floating point number.

String data types

  • CHAR(size)
  • VARCHAR(size)
  • TINYTEXT
  • TEXT(size)
  • MEDIUMTEXT
  • LONGTEXT

Date time types

  • DATE
  • TIME
  • YEAR
  • DATETIME
  • TIMESTAMP
© 2016 - 2023, All Rights are Reserved.