One or two binary data
Binary data is stored in 16 binary form.
Format: 1, binary (n) ———— a fixed-length n-byte binary data
2, varbinary (n) ———— n bytes Variable-length binary data
Ox24 ———— Where: Ox is a hexadecimal type, 24 is hexadecimal data
Second, character data
char (n) ———— character data type with a constant length of n
Three, String type
varchar (n) ———— the string type with a maximum length of n for a variable length. Save a few characters, such as name, login, password, etc., but no item can be longer than 8KB
does not contain string
Date Time Type: Fixed length of the data type
Datetime
smalldatetime
Five, shaping data types
bigint ———— (8B)
int ———— (4B)
smallint ———— (2B)
tinyint ———— (1B)
Six, floating-point type
Float ———— Small Precision
Decimal (p,s) ———— precision, accurate to four digits after the decimal point (p is the total number of digits is precision, S is the number of decimal places)
does not contain double
Seven, Boolean type
Bit
does not contain bool
Viii. type of currency
such as: money
Ix. type of text
The text ———— is used to store large text data of variable length, which can store 2GB
X. Image data Type
Image ———— in the database, to save the picture, try to save the picture path, do not store the picture directly
SQL Server data types