批量新增
insert into
insert into emp1 select * from emp;
修改
update emp set age=27,sex='男' where。。。
合并跟新
merge into 原表与目标表的合并跟新
merge into 目标表 t using 原表(select 语句)s on(匹配条件 )
when matched then
--匹配到要执行的操作(一般匹配到要执行跟新操纵)
update set t.列名=s.l列名,....【where 条件】
【delete where 条件】
when not matched then
--没有匹配到的情况,(一般执行的插入的操作)
insert 【(列名,...)】 values(值,。。。);
merge into emp e using demp d on(e.no=d.no)
when matched then
update set e.name=s.name
when not matched then
insert values(e.no,e.name);
update emp set rsex='男'
删除
delete from emp;
delete from emp where sex='男'
truncate table emp;