Image
|
Binary data types
|
The Image data type is used to store variable-length binary data up to 231-1 or approximately 2 billion bytes
|
Binary
|
Binary data types
|
Binary data types are used to store binary data up to 8000 bytes long
|
Bit
|
Integral type
|
The bit data type is integral, and its value can only be 0,1 or null (NULL). This data type is used to store data with only two possible values, such as Yes or no,true or false,on or off, etc.
|
Int
|
Integral type
|
The int data type can store an integer of-231 (-2147483648)? 231 (2147483648). This data type can be used for almost any numeric data stored in a database. This type of data occupies 4 bytes in the database.
|
Smallint
|
Integral type
|
The Smallint data type can store integers from 215 (-32768)? 215 (32767). This type of data occupies 2 bytes in the database.
|
Tinyint
|
Integral type
|
The Tinyint data type can store integers from 0?255. It is useful to store a limited number of values. This data type occupies 1 bytes in a database
|
Decimal
|
Precise numerical type
|
The Decimal data type can be used to store fixed precision and range numeric data from -1038-1?1038-1. When you use this data type, you must specify the range and precision. The range is the total number of digits that can be stored around the decimal point. Precision is the number of digits that are stored to the right of the decimal point
|
Numeric
|
Precise numerical type
|
The Numeric data type is the same as the decimal type
|
Money
|
Currency type
|
The Money data type is used to represent lines and currency values. This data type can store data from 922 billion to 922 billion, accurate to one out of 10,000 of the currency unit
|
Float
|
Approximate numerical type
|
The Float data type is an approximate numeric type. Floating point is approximate, because not all of the numbers in its range can be accurately represented. Floating-point numbers can be any number from -1.79e+308?1.79e+308
|
Real
|
Approximate numerical type
|
The Float data type is an approximate numeric type. Floating point is approximate, because not all of the numbers in its range can be accurately represented. Floating-point numbers can be any number from -1.79e+308?1.79e+308
|
Real
|
Approximate numerical type
|
Real data types are approximate numeric types like floating-point numbers. It can represent the number of floating-point numbers between -3.40e+38?3.40e+38
|
Datetime
|
Date-Time Type
|
The datetime data type is used to represent the date and time. This data type stores all date and time data from January 1, 1753 to December 31, 9999
|
smalldatetime
|
Date-Time Type
|
The smalldatetime data type is used to represent the date and time between June 6, 2079 and January 1, 1900.
|
Timestamp
|
Special Data type
|
The Timestamp data type is a special type of database used to create a database-scoped unique digital. There can be only one timestamp column in a table. Each time you insert or modify a row, the value of the timestamp column changes. Although it has time in its name, the timestamp column is not a date that people can recognize. In a database, the timestamp value is unique.
|
uniqueidentifier
|
Special Data type
|
The uniqueidentifier data type is used to store a globally unique identifier, the GUID. The GUID is truly globally unique. This number has little chance of being rebuilt in another system. You can use the NEWID function to convert a string to a unique identifier to initialize a column with a unique identifier
|
Char
|
Character type
|
The Char data type is used to store data that is not uniformly encoded at the specified length. When you define a column for this type, you must specify a column length. This data type is useful. This data type has a maximum width of 8,000 characters
|
Varchar
|
Character type
|
Varchar data type, same as char type, when storing non-uniform encoded character data, you need to specify the maximum length for the column
|
Text
|
Character type
|
The Text data type is used to store a large number of non-uniform encoded character data. This data type can have a maximum of 231-1 or 2 billion characters
|
Nchar
|
Unified encoded character type (Unicode)
|
The Nchar data type is used to store fixed-length, uniformly encoded character data. Uniform encoding uses a double-byte structure to store each character, rather than a single-byte (normal text case). It allows for a large number of extended characters. This data type can store 4000 characters, using a byte space plus one-fold
|
Ntext
|
Unified encoded character type (Unicode)
|
The Ntext data type is used to store a large number of uniformly encoded character-type data. This data type can store 230-1 or nearly 1 billion characters, and the byte space used increases by one times
|