Sql Tutorial Class


data type in sql server

 Data type in the SQL server: while the user who stores the data on the computer must identify the type of value. It can be text, number, image, sound, etc. To identify the data must be declared before storing it in the database. The data type is used in SQL Server to store data in the database according to the type of value. The type of data is an identification of value.

Some important Data Type in Sql Server

 Sn Data type Description Max size
1 varchar(n) character string 8,000 characters
2 varchar(max) character string 1,073,741,824 characters
3 nvarchar unicode string 4,000 characters
4 nvarchar(max) unicode string 536,870,912 characters
5 char(n) fixed character string 8,000 characters
6 nchar fixed Unicode string 4,000 characters
7 text character string 2GB of text data
8 ntext unicode string 2GB of text data
9 binary(n) Fixed binary string 8,000 bytes
10 varbinary binary string 8,000 bytes
11 varbinary(max) binary string 2GB
12 image binary string 2GB
13 bit can be 0, 1, or NULL
14 tinyint whole numbers  from 0 to 255
15 smallint whole numbers  between -32,768 and 32,767
16 int whole numbers  between -2,147,483,648 and 2,147,483,647
17 float(n) floating number  from -1.79E + 308 to 1.79E + 308.
18 datetime date only From January 1, 1753 to December 31, 9999 
19 date date only From January 1, 0001 to December 31, 9999
20 time time only

No comments:

Post a Comment