SQL:表格创建学习笔记

CREATE TABLE

语法

CREATE TABLE "table_name"
("column 1" "data type for column 1" [column 1 constraint(s)],
"column 2" "data type for column 2" [column 2 constraint(s)],
...
[table constraint(s)] );

示例

1 CREATE TABLE Users
2 (
3 Id INT PRIMARY KEY,
4 UserType NVARCHAR(50) DEFAULT "管理员",
5 Username NVARCHAR(50) UNIQUE,
6 Password NVARCHAR(50) NOT NULL
7 )
原文地址:https://www.cnblogs.com/happyframework/p/3467058.html