学习总结 DML数据库增删改语句

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

 

转载于:https://www.cnblogs.com/zhoudi/p/5599720.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值