Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
206 views
in Structured Query Language by (30.9k points)
closed by
Mr. Wilson wants to store the details of students. The details consist of different types of data. Explain different data types used in SQL to store data.

1 Answer

+1 vote
by (31.3k points)
selected by
 
Best answer

The different data types are 

1. Char (Fixed): 

It is declared as char (size). This data type is used to store alphanumeric characters. We have to specify the size. If no size is specified, by default we can store only one character.

2. Variable Character: 

It is declared as varchar (size). This data type is also used to store alphanumeric characters. But there is a slight difference. lt allocates only enough memory to store the actual size. 

3. Decimal: 

It is declared as Dec(size, scale), where size is the number of digits and scale is the maximum number of digits to the right of the decimal point. 

Eg: weight dec(3, 2)

4. Integer:

It is declared as int. It does not have any arguments. It takes more memory. 

Eg: ROllNO int.

5. Small Integer: It is declared as smallint. It takes less memory ROllNO int.

6. Date: It is used to store date. 

Eg: DOB date.

7. Time: It is used to store time. 

Eg: Joining_Time Time.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...