首页 > 数据库技术 > 详细

Oracle增删改DML脚本记录

时间:2016-10-19 09:31:28      阅读:337      评论:0      收藏:0      [点我收藏+]
--insert into添加数据
insert into student(sno,sname,ssex) values(110,王军,);


--提交事物
commit;

--回滚事物
--rollback;

insert into teacher1 select * from teacher;
insert into teacher1(ton,tname,prof) select ton,tname,prof from teacher;


--选择性插入两表之间
insert into teacher1 t(ton,tname,prof) select ton,tname,prof from teacher where ton=804;


--修改 update
update student set sclass=95031,ssex= where son=104;
commit


--修改成绩
update score set degree=degree+1;


--将空sclass内容更改95033
update student set sclass=95033 where sclass is null; 


--删除 delete
delete from student where sno=104;


--全表快速清空:先删表,在建表
truncate table stdent;

 

Oracle增删改DML脚本记录

原文:http://www.cnblogs.com/tfl-511/p/5975934.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!