SQL – Data Types
Most Common used SQL Data types
char(n) : Fixed n numbers of characters accepted(Memory will be Allocated for n character at the time of creation). Max 8,000 characters allowed.
varchar(n) : Variable n numbers of characters accepted(Memory will be Allocated for the character at run time). Max 8,000 characters allowed.
int : Range – whole numbers from 2,147,483,648 to 2,147,483,647
bigint : Range – whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
smallint : Range – whole numbers from -32,768 32,767
tinyint : Range – whole numbers from 0 to 255
decimal : Range Allows decimal numbers from -10^38 +1 to 10^38 -1
numeric : Allows numbers from -10^38 +1 to 10^38 –1.
text : Variable character string. Maximum 2GB of text data can be accepted.
nchar : Fixed size Unicode string. Maximum 4,000 characters allowed.
nvarchar :Variable size Unicode string. Maximum 4,000 characters allowed.
datetime : Range – From 31 Jan, 1753 to Dec 31, 9999
date : Stores date a date From January 1, 0001 to December 31, 9999
time : Store a time example : 1:00 PM
Advertisements
Add Comment
📖 Read More
- 1. SQL - CREATE Database
- 2. SQL - Select Database
- 3. SQL - CREATE TABLE
- 4. SQL - INSERT
- 5. SQL - SELECT
- 6. SQL - WHERE Clause
- 7. SQL - AND & OR
- 8. SQL ORDER BY
- 9. SQL - UPDATE
- 10. SQL - DELETE