SQL Data Types and Operators
In this lesson, we will learn about the different data types supported by SQL.
We'll cover the following...
We'll cover the following...
SQL data types
A SQL data type is an attribute that specifies the type of data of any object. You can specify the data type of each column in the table based on your requirements.
Some of them are listed below:
Exact Numeric Data Types
Data Type | Ranges From | To |
---|---|---|
int | -2,147,483,648 | 2,147,483,647 |
bigint | -9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 |
smallint | -32,768 | 32,767 |
tinyint | 0 | 255 |
bit | 0 | 1 |
decimal | -10^38 +1 | 10^38 -1 |
numeric | -10^38 +1 | 10^38 -1 |
Approximate Numeric Data Types
Data Type | Ranges From | To |
---|---|---|
float |