ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What are the types of data in SQL?

user-image
تم إضافة السؤال من قبل Yasmeen Husam , Web Developer , Al Fahid Systems
تاريخ النشر: 2018/11/18
MOHAMAD AJARUDEEN
من قبل MOHAMAD AJARUDEEN , Technology Business Analyst(Salesforce) , Barclays - India

In Generic,

Integer

Varchar

Numeric

Decimal

DateandTime

 

Ahmed Alharbi
من قبل Ahmed Alharbi , Electronics Engineer , Salem Agencies & Services

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

Alosious Delsot
من قبل 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
من قبل 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

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟