CREATE Table Table Name
(
Column Name 1 characteristics of the data type column,
Column Name 2 characteristics of the data type column,
...
)
Note: Boolean True and FALSE can be converted to the following bit value: True converts to 1,false to 0
Source:
Use MySchool--Set the current database to MySchool
GO
CREATE TABLE Student--Creating student information tables
(
Studentno int NOT NULL,--study number, non-empty (required)
Loginpwd nvarchar () not NULL,--password, non-empty (required)
Studentname nvarchar () not NULL,--name, non-empty (required)
Sex bit NOT NULL,--gender, non-null (required)
Gradeid int not NULL,--grade number (required)
Phone nvarchar () not NULL,--Telephone
Borndate datetime not NULL,--date of birth (required)
Address nvarchar (255),--Addresses
Email nvarchar (50),--Email account
Identitycard varchar (18)--ID number
)
GO
SQL Server database Creation table