Basic commands about tables in SQL Server

Use SSMS to manipulate the data sheet:

Data type: It
is an attribute of data that specifies the type of "storable" data of the object.
SQL Server data type: precise number, approximate number, character string, Unicode character string, binary character string, date and time, other data type
data Type:
1. Precise number:
integer type: the value is a positive integer or a negative integer (eg age)
bigint 8 bytes storage (ID card) //stores an integer between
-2 to the 63th power and 2 to the 63rd power int 4 bytes storage//Storage -2 to the 31st power of the integer between the 31st power
smallint 2 bytes storage//Storage -2 to the 15th power to the 15th power of the integer between the 2 small: small, small
tinyint 1 byte storage, a positive integer between 0-255 tiny: extremely small

位数型:bit	只存储0  1  或null(是一个标记)                         //存储只有两种可能值的数据,如YES或NO

小数型:decimal   格式:decimal(8,2)   8代表总长度  2代表小数点后面位数(例:123456.78)    decimal:十进制的,小数的
	numeric:同上↑                                              numeric:数,分数,不可通约数

To store numeric data with a fixed precision and range from -10 to the 38th power -1 to 10 to the 38th power -1, the range and precision must be specified. The range is the total number of digits that can be stored around the decimal point. Precision is the number of digits stored to the right of the decimal point

货币型:money    8字节

Guess you like

Origin blog.csdn.net/qq_50573146/article/details/109348056