1. Data type
A: Integer type
Bit,int,smallint,tinyint
"Relative to the number of operating system bits"
B: Numeric type
Decimal,numeric,money,smallmoney,float,real
"Save Decimal"
C: Character-related types
Char,varchar,text,nchar,nvarchar,ntext
D: Date Time Type
DateTime (Accurate to 0.01 seconds), smalldatetime (accurate to minutes), timestamp
E: Binary type
Image
"By image, video to binary, save to database"
2. Managing data tables with SQL statements
A: Create A data table
B: Define a non-null constraint
C: Define default values
D: Define primary key
E: Define foreign keys
F: Modify an existing data table
G: Delete data table
"If you have a primary foreign key relationship, you must first delete the foreign key table"
H: Solution for limited operation
If you delete a field F1 in table T, you can first create a table that has the same structure as the table T, with the only difference being the missing field F1.
The data in table T is then imported into T1, then the T is deleted, and the table T1 is renamed to T.
Database Series Learning (ii)-creation and management of data tables