欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

oracle 中常用语句集锦 博客分类: 数据库  

程序员文章站 2024-02-25 21:40:39
...

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;