type of data
Understand
Synonymous
Bit 1 bit, the value is 0 or 1 int inteer 4 bytes, the value is -2 ^ 31 ~ 2 ^ 31-1 Smallint 2 bytes, the value is -2 ^ 15 ~ 2 ^ 15-1 Tinyint 1 byte, value For 0 ~ 255 decimal (p, s) digital data, fixed accuracy is p, width is S Numeric Money 8 bytes, stored currency type, value is -2 ^ 63 ~ 2 ^ 63-1 Small Money 4 bytes, store The currency type, the value is -214748.3648 ~ 214748.3647 Approximate numerical data type FLOAT (N) N between 1 to 24, 4 bytes, 7-bit accuracy n = 1 ~ 7 is Real
N is between 25 and 53, 8 bytes, 15-bit precision = 8 ~ 15 is Float
DateTime 8 bytes, describing the date and time of a day, the value of the value of 1/300 seconds smalldatetime 4 bytes, describes the date and time of a day, accuracy is a reference TimeStamp 8 byte of the cursor, stored in The only data uniqueidentifier 16 bytes in the database, stores the unique identifier (GUID) CHAR (N) non-Unicode string fixed length, n = 1 ~ 8000 character (n)
VARCHAR (N) variable length, non-Unicode string n = 1 ~ 8000 char varying (n)
The variable length non-Unicode data in the Text server code page. Maximum length is 231-1 characters
NCHAR fixed length Unicode string n = 1 ~ 4000 national character (n), national char (n)
NVARCHAR fixed length Unicode string n = 1 ~ 4000 national character varying (n)
NTEXT variable length Unicode data, maximum length is 230-1 characters national text
Binary (N) fixed length binary data, N is between 1 to 8000, storage space is N 4 bytes
Varbinary (N) variable length binary data, n = 1 ~ 8000 binary varying (n)
TMAGE variable length binary data, size is 0 ~ 231-1
Note: 1) For numerical data types, the width is the number of digits stored after the decimal point, and the precision refers to all numerical numbers that contain a decimal point. 2) The storage width of Money and Small Money is 4.3) Timestamp column value is automatically updated when each line is updated, and the timestamp column cannot be part of a keyword or keyword. 4) Unique identification data types cannot use arithmetic operators (such as , -,,, etc.), which can only use equal comparison operations. Unicode is a standard for unanimous storage data for all character sets. It uses two times that of non-Unicode data stored in storage.