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:

  1. String (ex: varchar, tinytext, longtext etc.)
  2. Numeric (ex: int, bigint etc.)
  3. Date and Time
  4. 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 TypesUse cases
INT or BIGINTUsed to store integer data values into table field
VARCHARUsed to store character/string data values
DATEUsed to store date values
BLOBUsed to big data values like images,pdfs etc.
TEXT or MEDIUMTEXTUsed to store large amount of string value(text)

Note: when you practice PHP and MySQL together and build impressive websites like us, then your concept about this data-type will become better.

If you want to learn PHP then visit our domain: