Data types are used to represent the nature of the data that can be stored in the database table. For example, in a particular column of a table, if we want to store a string type of data then we will have to declare a string data type of this column.
Data types mainly classified into three categories for every database.
- String Data types
- Numeric Data types
- Date and time Data types
MySQL Data Types
A list of data types used in MySQL database.
MySQL String Data Types
CHAR(Size) | Its size can be 0 to 255 characters. Default is 1. |
VARCHAR(Size) | Its size can be from 0 to 65535 characters9 |
MySQL Numeric Data Types
BIT(Size) | Its size can be 1 to 64. The default value is 1. |
INT(size) | Its signed range varies from -2147483648 to 2147483647 and unsigned range varies from 0 to 4294967295. |
INTEGER(size) | It is equal to INT(size). |
|
|
MySQL Date and Time Data Types
DATE | Its supported range is from '1000-01-01' to '9999-12-31'. |
|
|
YEAR | Values allowed in four digit format from 1901 to 2155, and 0000. |
0 Comments
Thanks for Supporting me