赞
踩
- #上图是一张名为student的表,表由column、value组成。
- #下面演示对它进行一些常用的操作。
-
- #增:
- insert into student values("G0107","S201801200","小明","男","2001-08-09",17) #插入一整行值,不可错位
- insert into student (student_name,gender,age) values("小李","男",19) #插入部分值
-
- #删
- delete from student where student_name ="孙权" #删掉孙权所在的这一行
- alter table student drop column gender #删掉gender这一列
-
- #改
- update student set gender ="女" where student_name ="小李" #将小李的gender改为女
-
- #查
- select * from student #查询所有列,即整张表
- select student_name,gender from student #两列,列之间用逗号隔开
-
- select * from student whe
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。