Data Type means what type of data can be hold by a particular field of that table into a relational database.
There are basically 4 types of data type in MySQL has:
- String (ex: varchar, tinytext, longtext etc.)
- Numeric (ex: int, bigint etc.)
- Date and Time
- Long Object (BLOB, LONGBLOB etc.)
In MySQL there are many data types which are used for many cases. This data-type specifies what type data could be stored into the table’s fields.
We assume only a MySQL database for this example.
Data Types | Use cases |
INT or BIGINT | Used to store integer data values into table field |
VARCHAR | Used to store character/string data values |
DATE | Used to store date values |
BLOB | Used to big data values like images,pdfs etc. |
TEXT or MEDIUMTEXT | Used to store large amount of string value(text) |
Note: when you practice PHP and MySQL together and build impressive websites like us, microcodes.in then your concept about this data-type will become better.
If you want to learn PHP then visit our domain:
https://php.microcodes.in/index.php/basics/introduction-to-php/