UNit1 - Database Languages
UNit1 - Database Languages
Topic:
Database Languages
Learning Objectives
Normally, insert, update, delete, select are DML commands. DML reflects
Database Languages cont.…
Ex: For insert command:
insert into student values("A-101", "Ramesh", 12);
Ex: for update command:
update student set class = 11 where sid = "A-101“;
Ex: For delete command:
delete from student where sname = "RAJ“ ;
Ex: for select command:
select * from student ;
3) Data Control language (DCL):
DCL statements control access to data and the database using
statements such as GRANT and REVOKE. A privilege can either be
granted to a User with the help of GRANT statement.
The privileges assigned can be SELECT, ALTER, DELETE,
EXECUTE, INSERT, INDEX etc. In addition to granting of privileges,
you can also revoke (taken back) it by using REVOKE command.
3) (DCL – grant and revoke ):
GRANT :
-This command is used to allow a permission for specific user.
DENY:
- This command is used to refuse the permission for particular user.
REVOKE:
- The revoke command is used to remove a GRANT or DENY
privileges from a specific user or role, or from all users, to perform actions on
database objects.
3) DCL – grant:
Grant Command:
• Give the permission to other user.
Syntax
Grant <privileges> on <tablename> to
<username>
Example
SQL>Grant select on emp to user1;
3) DCL – grant:
Example:
Example:
SQL>revoke select on emp from user1;
SQL> revoke insert, delete on emp from user2;
Syntax:
Deny <privileges> to <username>
1.Languages
2.Inferences
3.Texts
4.Lines
Answer: A) Languages
MCQ 2
1.Read
2.Store
3.Update
4.All of the above