mysql 学生表 单表增删改查(模糊,倒叙)
select * from student
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190309495.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
select * from student where Sid = 02
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190401807.png)
update student set Ssex = "女",Sname="人才" where Sid = 02
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190749868.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
delete from student where Sid = 02
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190603996.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
insert into student values("02","周树人","1990-05-20 00:00:00","男")
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190656974.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
select * from student order by Sid desc
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190849366.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
select * from student where Sname like "周%"
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323190938151.png)
select * from student where Sname not like "周%"
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323191037395.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FhYWFhYWFhYW5qamo=,size_16,color_FFFFFF,t_70)
select Sname,year(now())-year(Sage) from student
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210323191100580.png)
总sql语句
select * from student
select * from student where Sid = 02
update student set Ssex = "女",Sname="人才" where Sid = 02
delete from student where Sid = 02
insert into student values("02","周树人","1990-05-20 00:00:00","男")
select * from student order by Sid desc
select * from student where Sname like "周%"
select * from student where Sname not like "周%"
select Sname,year(now())-year(Sage) from student