Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grant SELECT on multiple tables oracle

Tags:

I have 3 tables table1,table2,table3. I want to grant(select for example) these tables to a user, user1.

I know that I can grant with:

grant select on table1 to user1; grant select on table2 to user1; grant select on table3 to user1; 

Can I grant the 3 tables to user1 using only 1 query?

Thanks

like image 464
Sergio Martinez Avatar asked Mar 16 '13 15:03

Sergio Martinez


People also ask

How do I grant multiple tables in SQL?

grant select on table1 to user1; grant select on table2 to user1; grant select on table3 to user1; Can I grant the 3 tables to user1 using only 1 query?


1 Answers

No. As the documentation shows, you can only grant access to one object at a time.

like image 86
Chris Saxon Avatar answered Sep 17 '22 16:09

Chris Saxon