Data Manipulation Language - DELETE Statement

Delete statement is used to delete the data from a specific table in ROW – BY – ROW (one by one) manner without disturbing its structure (columns).

Syntax:

DELETE FROM TABLE_NAME [WHERE (CONDTION)]

Example:

DELETE FROM EMP

The statement deletes all records from EMP table without disturbing its structure (columns). This is called high level deletion.

Example:

Write a Query to delete all employee who are working under 10th department

DELETE FROM EMP WHRE DEPTNO=10

Example:

Write a Query to delete all employ who is working under 20th department and employ number 33

DELETE FROM EMP WHERE DEPTNO=20 AND EMPNO=33
Share/Bookmark

No comments: