标红位置改为自己相应的,该例子为创建 READUSER只读USER的表
CREATE USER READUSER IDENTIFIED BY 123;
GRANT CONNECT TO READUSER;
执行如下命令
select 'grant select on '||owner||'.'||object_name||' to USER;'
from dba_objects
where owner ='READUSER'
and object_type='TABLE';
会有如下结果,复制 如下7(n)行执行即可
'GRANTSELECTON'||OWNER||'.'||OBJECT_NAME||'TOREADUSER;' -------------------------------------------------------------------------------- grant select on USER.VISIT_SYSTEM_INFO to READUSER; grant select on USER.VISIT_TIME_DIC to READUSER; grant select on USER.VISIT_TOTAL to READUSER; grant select on USER.VISIT_TOTAL_CHANNEL to READUSER; grant select on USER.VISIT_TOTAL_NEWS to READUSER; grant select on USER.WORDS_HOT_CATEGORY to READUSER; grant select on USER.WORDS_SENSITIVE_CATEGORY to READUSER; 7 rows selected.
原文链接:https://www.f2er.com/oracle/213915.html