Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does each data type mean when creating a table in sql server?
What does each data type mean when creating a table in sql server?
The classification and meaning of SQL Server data types are as follows:

1, string:

2.Unicode string:

3. Binary type:

4. Number type:

4. Date type:

5. Other data types:

Extended data:

Characteristic analysis of SQL data types;

In SQL Server, every column, local variable, expression and parameter has a related data type. Data type is an attribute that specifies the data type that an object can save: integer data, character data, currency data, date and time data, binary string, etc.

When two expressions with different data types, sorting rules, precision, decimal places or lengths are combined by operators, the characteristics of the results are determined by the following rules:

1. The data type of the result is determined by applying the precedence rule of data type to the data type of the input expression. For more information, see Data Type Priority (Transact-SQL).

2. When the data type of the result is char, varchar, text, nchar, nvarchar or ntext, the sorting rule of the result is determined by the priority rule of the sorting rule. For more information, see Collation Priority (Transact-SQL).

3. The precision, decimal places and length of the result depend on the precision, decimal places and length of the input expression. For more information, see Precision, Decimal Scale and Length (Transact-SQL).

References:

Baidu encyclopedia-SQL data type