From db9455073f2903553bcc96eb06f070af441d2f79 Mon Sep 17 00:00:00 2001 From: iProbe Date: Thu, 16 Feb 2023 10:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93/oracle/oracle=E6=9D=83=E9=99=90=E5=8F=8A=E5=90=8C?= =?UTF-8?q?=E4=B9=89=E8=AF=8D.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 数据库/oracle/oracle权限及同义词.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/数据库/oracle/oracle权限及同义词.md b/数据库/oracle/oracle权限及同义词.md index 65e8bb0..a32d4a7 100644 --- a/数据库/oracle/oracle权限及同义词.md +++ b/数据库/oracle/oracle权限及同义词.md @@ -2,6 +2,11 @@ ``` grant select on USER1.TABLE to USER2; ``` +### user1的所有表的select权限赋给user2 +```sql +--- 获取授权语句 +select 'grant select on '||owner||'.'||object_name||' to user2;'from dba_objects where OWNER = 'user1' and object_type in ('TABLE'); +``` ### 添加创建同义词权限 ``` grant create synonym to USER2;