DATA TYPES used in MySql

This is a list of general SQL data types that may not be supported by all relational databases. I the future we will discuss more about all the data types. For now we will use the ones listed here.

Data type Syntax Description
Integer Integer
Smallint Smallint
Numeric Numeric(p,s) - p is the precision values .-s is the scale values. For example numeric (6,2) is a number that has 4 digits before the decimal and 2 digits after decimal(9999,99). - Numeric (6,3) would be a number that that has 3 digits before decimal and 3 after decimal (999,999).
Decimal Decimal(p,s) - p is the precision values .-s is the scale values.
Real Real -single precision floating number
Character Char(x) -where x will be the number of character allowed to store
Character Varying Varchar(x) -where x will be the number of character allowed to store
Float Float(p) - p is the precision values .
Bit Bit(x) -where x will be the number of bits allowed to store
Date Date -stores the month , year and day values
Time Time -stores hour , minute and second values
Timestamp Timestamp -stores year , month ,day , hour, min, and seconds
a