Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What are the types of data in SQL?

user-image
Question ajoutée par Yasmeen Husam , Web Developer , Al Fahid Systems
Date de publication: 2018/11/18
MOHAMAD AJARUDEEN
par MOHAMAD AJARUDEEN , Technology Business Analyst(Salesforce) , Barclays - India

In Generic,

Integer

Varchar

Numeric

Decimal

DateandTime

 

Ahmed Alharbi
par Ahmed Alharbi , Electronics Engineer , Salem Agencies & Services

There are three main data types: text, number, and date.

Alosious Delsot
par Alosious Delsot , Application Analyst , Healthcare Solutions

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

Younes LABIOD
par Younes LABIOD , Software Developer , Precision Industries

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

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?