ITeye博客

更新表、备份表、 sqlserver + oracle

cqh520llr · 2013-12-05 08:55 · 更新表、备份表、 · 数据库 · Markdown



1、备份表
sqlserver : select * into 表名 from table;
oracle : insert into t select * from table;
craete table t as select * from table;

2、更新多列
sqlserver :
UPDATE T SET B=b_bak,c=c_bak from t as e, (SELECT a,B as b_bak,c as c_bak FROM TT) f where e.a=f.a;

oracle :
update t set (b,c) = (select b,c from tt where tt.a = t.a)


评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。