MySQL Data Types - Most Frequently Used

MySQL Data Types - Most Frequently Used

MySQL Data Types

CHAR(length)
Character string with a fixed length which is the number between the ( )

VARCHAR(length)
Character string with a variable length. The maximum is the number between the ( )

TEXT
Variable character string that can be up to 64 kb

INT(length)
Integer which can be any number between -2147483648 to 2147483647
The number between the ( ) is the maximum length (digits) of the number that will be displayed even though the stored number might be longer

INT(length) UNSIGNED
Integer which can be any number between 0 to 4294967295
The number between the ( ) is the maximum length (digits) of the number that will be displayed even though the stored number might be longer
Integer cannot be a negative number

DECIMAL(length, dec)
Decimal number with a display length between the ( )
dec is the maximum number of decimal places

DATE
Date stored in the YYYY-MM-DD format

TIME
Time stored in the HH:MM:SS format

DATETIME
Date and time stored in the YYYY-MM-DD HH:MM:SS format

PRIMARY KEY
The field that is the unique ID for the record






This site needs an editor - click to learn more!



RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2019 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.