create table student (
                         id int primary key auto_increment,
                         name varchar(50) not null,
                         sex char(1),
                         age int,
                         birthday date,
                         sourse  double(5,2),
                         email varchar(50),
                         tel char(11),
                         status enum('正常','休学','毕业')
);


# DML 数据操作

# 列和值 对应
insert into student
    (name, sex, age, birthday, sourse, email, tel, status)
values
    ("张三", "男", 18, "1995-02-15", 92.5, "zhangsan@163.com", "13812345678", "正常");

insert into student
(name, sex, age, birthday, sourse, email, tel, status)
values
    ("李四", "女", 28, "1990-02-15", 92.5, "李四@163.com", "13812341234", "毕业");

insert into student
(id,name, sex, age, birthday, sourse, email, tel, status)
values
    (4,"赵六", "女", 28, "1990-02-15", 92.5, "李四@163.com", "13812341234", "毕业");


# 简单
insert into student values
    (6,"缝份", "男", 23, "1993-02-15", 83.5, "ff@163.com", "13843211234", "正常"),
    (7,"凡凡", "女", 22, "1992-02-15", 82.5, "kk@163.com", "13843211234", "正常")



# 修改数据
update student set name="张三丰",age = 101 where id=1;

# 一般 不使用 批量修改。
# 修改 状态为 正常  分数 - 10
update student set sourse = sourse - 10 where status= '正常';


# 删除数据
delete from student where id = 7;

-- 删除student表中所有的数据
delete from student;