Grant Syntax [message #453662] |
Fri, 30 April 2010 03:54 |
mjkreddy1927
Messages: 20 Registered: February 2007
|
Junior Member |
|
|
Hi i have a senario, where i need to give the privilage to user on the table in a schema.
Now there is a table which already has certain privilages to the user, so now i need to give the same all privilages to the other newly created table to the particular table.
Sample query:
Table X and Y.
X has some 1,2,3,4...10 privileges to ABC user.
Now i created new table Y and i want to give the same all privilages to the ABC user.
is there any syntax which can do so.
Which can acquire all the privilages same X does.
please help me out.
[EDITED by LF: fixed topic title typo]
[Updated on: Fri, 30 April 2010 04:27] by Moderator Report message to a moderator
|
|
|
Re: Grant Syantax [message #453664 is a reply to message #453662] |
Fri, 30 April 2010 04:11 |
Its_me_ved
Messages: 979 Registered: October 2009 Location: India
|
Senior Member |
|
|
Please go through the link
The Syntax for the GRANT command is:
GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];
/*Be careful while using WITH GRANT OPTION [Please follow the doc link ] */
For Eample: GRANT SELECT ON employee TO user1;This command grants a SELECT permission on employee table to user1.You should use the WITH GRANT option carefully because for example if you GRANT SELECT privilege on employee table to user1 using the WITH GRANT option, then user1 can GRANT SELECT privilege on employee table to another user, such as user2 etc. Later, if you REVOKE the SELECT privilege on employee from user1, still user2 will have SELECT privilege on employee table.
You can also have a look at the table user_tab_privs
Thanks
Ved
[Updated on: Fri, 30 April 2010 04:21] Report message to a moderator
|
|
|
|
|