Register now or log in to join your professional community.
In Generic,
Integer
Varchar
Numeric
Decimal
DateandTime
There are three main data types: text, number, and date.
1) CHARACTER [(length)] or CHAR [(length)]
2) VARCHAR (length)
3) BOOLEAN
4) SMALLINT
5)INTEGER or INT
6) DECIMAL [(p[,s])] or DEC [(p[,s])]
7) NUMERIC [(p[,s])]
8) REAL
9) FLOAT(p)
10) DOUBLE PRECISION
11) DATE
12) TIME
13) TIMESTAMP
Threre ara several types of data in SQL, and it's important to understand the uses and particularities of each type of data, in order to choose the best possible type when you define the columns of your tables. Choosing the wrong kind of data could lead to critical situations such as: a waste of memory, performance problems.
Each DBMS has its own data types, the following types are used by the MySQL :
1 Numeric types : numeric types can be subdivided into two sub-categories: integers, and decimals.
Integers : INT, TINYINT, SMALLINT, MEDIUMINT and BIGINT.
Decimals : DECIMAL, NUMERIC, FLOAT, REAL and DOUBLE.
2 Alphanumeric types : CHAR, VARCHAR and TEXT.
3 Time Types : DATE, DATETIME, TIME, TIMESTAMP and YEAR.
Best regards,
Younes LABIOD