CREATE TABLE students (
id INT UNSIGNED PRIMARY KEY, # 整型(INT),无符号(UNSIGNED),PRIMARY KEY(主键约束)
name VARCHAR(20) NOT NULL, # 字符串(VARCHAR),最大长度二十,NOT NULL(必须填写)
sex CHAR(1) NOT NULL, # CHAR(固定长度字符串)
birthday DATE NOT NULL, # DATE(日期)
tel CHAR(11) NOT NULL, # 电话
remark VARCHAR(2000)
);
增加数据
语法
INSERT INTO students VALUES(1, "bobo", "男", "1995-05-15", "13312345678", NULL);