DML数据增删改语句基础(1)

1 insert into score t values('111','3-105',88)--插入一行数据
2 insert into score(sno,cno) values('111','3-105')--指定插入某一行的哪一列数据
3 insert into score_1 select * from score --把表score中的全部数据复制到score_1表中,前提条件表的数据结构要一致
4 insert into score_1 (sno1,cno1,degreel) select * from score--表的数据结构不一致或字段的多少不一致时,复制score表中的所有数据,插入到score_1表中指定的其中3个列中
5 insert into score_1 (sno1,cno1,degreel) select * from score where con='3-105'--选择性的添加数据,选择表中的哪些数据插入到新表当中 
6 delete score_1 t--清空表中所有的数据
7 delete from score_1 t where degree1<80--清空分数小于80的数据
8 update student set class='95033' where sno='104'--set修改哪一列的数据,根据哪一行的数据

 

posted @ 2016-06-17 23:52  明天会更好!!!!  阅读(165)  评论(0)    收藏  举报