MySQL data types

​MySQL database has several data types. I will try to explain most common of these, please choose a specific data type that feet your needs.

Out of whole numbers data types there are: TINYINT, SMALLINT, MEDIUMINT, INT, BUGINT.

There are two data types that hold a list of values. These data types are: ENUM and SET.

To keep date data type it is possible to do with the help of DATE data type.

DATETIME can be used to store both date and time information.

TIMESTAMP data type can be used for the case when this database record was created or updated. The field that has this data type is updated automatically whenever this record is created or updated.

CHAR is a data type that holds characters and has specific length.

TEXT is a data type that can hold more than a single character. There are several TEXT type definitions, each one with a different number of maximum number of characters.

VARCHAR is data type that can hold variable length of characters. VARCHAR data type has a maximum number of characters, this number is specified when a database column of this data type is created.

BLOB data type is used to store variable length binary data.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator