Data types for beginners to PHP

mysql Data Type

The type of data field defined in MySQL is very important for the optimization of your database.

MySQL supports multiple types, which can be roughly divided into three categories: numerical, date/time and string (character) types

Numerical types, please see the following Zhang table

图片5.png

##Date and time types

图片6.png

##The date and time types representing time values ​​are DATETIME, DATE, TIMESTAMP, TIME and YEAR.

Each time type has a valid value range and a "zero" value. The "zero" value is used when specifying an illegal value that MySQL cannot represent

String typeString type refers to CHAR, VARCHAR, BINARY, VARBINARY, BLOB, TEXT, ENUM and SET. This section describes how these types work and how to use them in queries


图片7.png


Continuing Learning
||
<?php echo "欢迎学习数据库数据类型"; ?>
submitReset Code