0% found this document useful (0 votes)
11 views2 pages

SQL Data Types in DBMS Handwritten Style

SQL data types in DBMS define the types of values that can be stored in table columns, categorized into numeric, character/string, date and time, boolean, and binary data types. Each column must be declared with an appropriate data type to ensure data integrity and efficient handling. Examples include INT for whole numbers, VARCHAR for variable-length text, and DATE for storing dates.

Uploaded by

sohasimrankhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

SQL Data Types in DBMS Handwritten Style

SQL data types in DBMS define the types of values that can be stored in table columns, categorized into numeric, character/string, date and time, boolean, and binary data types. Each column must be declared with an appropriate data type to ensure data integrity and efficient handling. Examples include INT for whole numbers, VARCHAR for variable-length text, and DATE for storing dates.

Uploaded by

sohasimrankhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Data Types in DBMS

SQL Data Types in DBMS

In DBMS, SQL data types define the kind of value that can be
stored in a table column. Each column must be declared with an
appropriate data type. The main categories are:

1. Numeric Data Types:


- INT / INTEGER: Whole numbers (e.g., 100, -5)
- SMALLINT / BIGINT: For smaller or larger integers
- DECIMAL(p,s) / NUMERIC(p,s): Fixed-point numbers
- FLOAT / REAL / DOUBLE: Decimal numbers (approximate)

2. Character/String Data Types:


- CHAR(n): Fixed-length text
- VARCHAR(n): Variable-length text
- TEXT: Long text like paragraphs

3. Date and Time Data Types:


- DATE: Stores date (YYYY-MM-DD)
- TIME: Stores time (HH:MM:SS)
- DATETIME / TIMESTAMP: Stores date and time together

4. Boolean Data Type:


- BOOLEAN: TRUE, FALSE or NULL
SQL Data Types in DBMS

5. Binary Data Types:


- BINARY / VARBINARY: Binary strings
- BLOB: Large binary files (e.g., images)

These types ensure data integrity and efficient data handling in


SQL-based databases.

You might also like