How the columns in a table are defined

The columns of the products table

Field Type Null Key Default Extra
productID int(11) NO Pri NULL auto_increment
categoryID int(11) NO NULL
productCode varchar(10) NO Uni NULL
ProductName varchar(255) NO NULL
listPrice decimal(10,2) NO NULL

Common MySQL data types

Type Description
CHAR A fixed-length string of charcters in the ASCII character set.
VARCHAR A variable-length string of characters in the ASCII character set.
INT Integer values of various sizes.
Decimal Decimal values that can contain an integer portion and a decimal portion.
DATE, TIME, DATETIME A date, time, or date and time.

Description

Back