0% found this document useful (0 votes)
32 views1 page

DDL (Data Definition Language) :: Commands

Uploaded by

nandhuln
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

DDL (Data Definition Language) :: Commands

Uploaded by

nandhuln
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DDL (Data Definition Language): 

Changes/Defines the structure of the table in datebase like creating a table, deleting a table,
altering a table, etc.

COMMANDS
CREATE -> CREATE TABLE nand_1148 (Empid NUMBER(4),Ename VARCHAR2(20),Edesg VARCHAR2(30));

ALTER(ADD)-> ALTER TABLE nand_1148 ADD (Eteam VARCHAR2(20));

ALTER(MODIFY)-> ALTER TABLE nand_1148 MODIFY(Eteam VARCHAR2(30));

ALTER(DROP)-> ALTER TABLE nand_1148 DROP(Eteam);

RENAME-> RENAME nand_1148 to EMP_1148;

TRUNCATE ->TRUNCATE TABLE tablename;

DROP -> DROP TABLE tablename;

RENAME COLUMN NAME ->ALTER TABLE emp_1148 RENAME COLUMN empid TO EMP_ID;

DEFINTIONS
Create-Create table.

Rename-Rename table.

Drop-Delete table.

Truncate-delete data’s in table.

Alter Add-Add coloumn’s in table.

Alter Modify-Change/Modify coloumn size,datatype,default value.

Alter Drop-Delete column in table.

You might also like