oracle 中常用语句集锦

begin
  for cur in (select userid, username from t_a) loop
    insert into t_b (xx, xx) values (cur.userid, cur.username);
  end loop;
  commit;
end;

--创建只有查询权限的用户
create user search identified by search; 
grant select any table to search; --授予查询任何表 
grant select any dictionary to search;--授予 查询任何字典 
grant resource,connect to search;

--备份某个表

create table t_bak as select * from t;

猜你喜欢

转载自hngmduyi.iteye.com/blog/1891600