Sub Languages
Sub Languages
Sub Languages
DDL Sub language: This sub language is used to work with table header part.
This sub language contains different types of commands,
a. Create,
b. Alter,
c. Truncate,
d. Drop
e. Rename
D means Drop, R means Rename, C means Create, A means Alter and T means Truncate.
Table created.
ADDING COLUMNS
DROPPING COLUMNS
DML sub language: This sub language is used to work with data part of table.
This sub language contains three commands, INSERT, UPDATE and DELETE
INSERT:
In different ways we can insert the data into table
SQL> /
SQL> /
9 rows selected.
9 rows selected.
NOTE: If we don’t use WHERE condition in delete statement or update statements then it affects all the
records.
DDL:
TRUNCATE: Truncate command will remove the entire data but structure will remain same.
SQL> truncate table student_tab;
Table truncated.
DROP: Drop command will drop the entire table from database and this dropped table will
move to the RECYCLE BIN.
To drop table permanently from database we will use PURGE in the drop statement, so that
dropped table will not go to RECYCLEBIN.
DRL Sub language: This sub language contains only one SELECT command.
SELECT command is used to retrieve the data from table.