首页 > 数据库技术 > 详细

Oracle

时间:2015-09-15 17:56:03      阅读:265      评论:0      收藏:0      [点我收藏+]

(1) 在oracle中,如果需要执行多条相同的语句,可以通过ping语句实现,例如:在user_obejects表中有多张表的表名存在列OBJECT_NAME中,此时通过以下语句:

SELECT ‘grant select,update on user_name1.‘||object_name||‘ to user_name;‘ from user_objects where  OBJECT_TYPE in (‘TABLE‘ ,‘VIEW‘)

技术分享技术分享

 

 

 

 

 

 

(2) 创建用户:

create user user_name1 identified by "password"
default tablespace tablespace_name
temporary tablespace temporarytable_name
profile DEFAULT;

(3)给对象赋权:-- Grant/Revoke object privileges 

grant connect to user_name1;
grant resource to user_name1;

grant select,update on user_name.table_name to user_name1

 

Oracle

原文:http://www.cnblogs.com/roseHLF/p/oraclehlf.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!