sql server ___________data control language

8
DATA CONTROL LANGUAGE DCL

Upload: ehtisham-ali

Post on 20-Jan-2017

166 views

Category:

Education


7 download

TRANSCRIPT

Page 1: Sql server  ___________data control language

DATA CONTROL LANGUAGE

DCL

Page 2: Sql server  ___________data control language

DCL is used to control permission on database objects. DCL statements are used to take care of the security and

authorization. Types of DCL statements are as follows

a. Grant statement b. Revoke statementc. Deny statment

Page 3: Sql server  ___________data control language

Grant statment

Grant privilege (rights which are to be allocated ) is used when database is to be shared with other users, with certain types of rights granted to the users.

Permissions are controlled by using the grant and revoke statements and deny statement.

Page 4: Sql server  ___________data control language

Grant {all | statements} On table_nameTo security_account

Example:Grant select on employee to john

Page 5: Sql server  ___________data control language

Revoke statement

Revoke statement removes a previously granted or denied permission from a user in the current database

Page 6: Sql server  ___________data control language

Revoke {all | statement}On table_nameFrom security_acccount

Example :Revoke select on employee from john

Page 7: Sql server  ___________data control language

Deny statement

The deny statemant creates an entry in the security system that denies a permission from a security account in the current database and prevents the security account from inheriting the permission through its group or role membership.

Page 8: Sql server  ___________data control language

Deny {all | statement}On table_nameTo security_account

Example:Deny select on employee to john