g
Printer Friendly Version

editor  
BellaOnline's PHP Editor
 

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!

PHP Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 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 Editor Wanted for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor