Sunday, June 21, 2009

alter (DDL) commands in SQL?

DDL : Create,Drop,Truncate,Alter
DML: Insert,Update, Delete
DCL : Grant,Revoke,Commit,Rollback;
-- retrieving the duplicate name records only
select ename from emp e1 where 1 < (select count(*) FROM emp e2 WHERE e2.ename = e1.ename) --alter:to add ,modify and drop a column alter table add/modify
alter table drop column
select round(11.567, 0) from dual; --12
select round(11.567, 1) from dual; --11.6
select round(11.567, 2) from dual; --11.57
select round(11.567, 3) from dual; --11.567

No comments:

Post a Comment