DDL
****
Data Definition Language (Create, Alter, Drop, Truncate)
Eg:
create table emp (empid int, empname varchar(20))
drop table emp
truncate tabel emp
alter table emp drop empname
alter table emp add column empname varchar(20)
alter table emp add constraint pk_emp primary key(empname) //pk_emp is primary key
DML
*****
Data Manipulating Language (Select, Update, Delete, Insert)
Eg:
select * from emp
update emp set empid = 10 where empid = 20
delete emp //Delete all the records in the table
delete from emp where empid = 20
insert into emp values(vv,'srsre')
DCL
*****
Data Control Language (Revoke, Commit, Rollback, Grant)
17.3.08
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment