Saturday, April 6, 2019

GRANT | Grant Command In SQL | DCL Command

GRANT Command


Grant command used to provide access or privileges on the database objects to the users.



Syntax :

GRANT privilege_list ON object_name
TO {user_name | PUBLIC | role_name}
[with GRANT option];


Grant command has five types of parameter :

1) privilege_list - This parameter specifies the access right or privilege granted to
the user.

2) object_name - This parameter specifies the name of the database object like table, view
etc.

3) user_name - This parameter specifies the name of the user to whom an access right is
being granted.

4) with GRANT option - It allows users to grant access rights to other
users.

5) role_name - This parameter specifies set of privileges grouped together.

Keyword

PUBLIC - Used to grant rights to all the users.

Example :
 
GRANT SELECT ON Customer01 TO user1 ;

* * * * * * * * * * * * * * * * *

In Easy Language :

Grant command used to access privileges.



Previous Post
Next Post

post written by:

0 Comments: