insert update delete等语句更新库表数据时,拼写其相应的回滚语句 10
一个sql语句,可能是selectinsertupdatedelete等,语句执行时要保留其相应的回滚语句,以便后期恢复insert对应deleteupdate对应upd...
一个sql语句,可能是 select insert update delete等,语句执行时要保留其相应的回滚语句,以便后期恢复
insert 对应delete update 对应update delete对应insert
例如
1:insert into SCHEMA.TABLE_A select * from SCHEMA.TABLE_B where TABLE_B.id ='111'对应的delete语句为 delete from SCHEMA.TABLE_A where TABLE_A.id ='111' ;
2:update SCHEMA.TABLE_A set TABLE_A.nm = '222' where id like '11%' 对应的update语句为(表中假设有2条数据 id='111' nm ='xx' 和id ='11' nm =‘yy’)
update SCHEMA.TABLE_A set TABLE_A.nm = 'xx' where id='111';
update SCHEMA.TABLE_A set TABLE_A.nm = 'yy' where id='11';
3:delete from SCHEMA.TABLE_A;对应的insert语句为
insert into SCHEMA.TABLE_A(id,nm) values('11','xx');
insert into SCHEMA.TABLE_A(id,nm) values('111','yy')
不胜感激!!!!!
备注:sql语句没有被格式化过 展开
insert 对应delete update 对应update delete对应insert
例如
1:insert into SCHEMA.TABLE_A select * from SCHEMA.TABLE_B where TABLE_B.id ='111'对应的delete语句为 delete from SCHEMA.TABLE_A where TABLE_A.id ='111' ;
2:update SCHEMA.TABLE_A set TABLE_A.nm = '222' where id like '11%' 对应的update语句为(表中假设有2条数据 id='111' nm ='xx' 和id ='11' nm =‘yy’)
update SCHEMA.TABLE_A set TABLE_A.nm = 'xx' where id='111';
update SCHEMA.TABLE_A set TABLE_A.nm = 'yy' where id='11';
3:delete from SCHEMA.TABLE_A;对应的insert语句为
insert into SCHEMA.TABLE_A(id,nm) values('11','xx');
insert into SCHEMA.TABLE_A(id,nm) values('111','yy')
不胜感激!!!!!
备注:sql语句没有被格式化过 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询