Data Control Language is used to control privileges in Databases. In Data Control Language we have two commands.
- GRANT:- GRANT command is used to provide access or privileges on the database.
- REVOKE:- REVOKE command removes user access rights or privileges to the database objects.
First, we create a login with a password “123”.

In the object explorer expand the security → Refresh and expand the logins → LOG_TBL login is successfully created.

Second, we create a user by using a create user command.

Go to the TestDB database → Expand the security →Expand users → USER_TBL user is created.

After that, we connect to a SQL Server.
Select SQL Server Authentication and enter Login Name and Password.

Then we connect to the new user that is LOG_TBL.

LOG_TBL user can not access the address table because we do not assign GRANT permission.

So we assign GRANT permission to the user.

After assigning GRANT permission LOG_TAB users access the address table.

Here we remove the permission by using the REVOKE command.

After assigning revoke permission. Users can not access the address table.

Then we drop the user but while execution error happens.

So we execute the below query to get session id.

After we get a session-id kill that session-id with the help of KILL command.

Then we execute drop command and it successfully completed.

If you are a newbie to database learning -SQL Server recommended is the following must-watch video: -