Oracle: DELETE Statement

DELETE keyword in SQL helps to remove records from the database. It is different from DROP keywords as DELETE Clause removes the values from the table but, DROP is used to remove the entire table.

Syntax:

DELETE from Table_name;

The use of the above syntax can delete the entire record present in the table.
 

DELETE from Table_name
WHERE Condition...;

DELETE with WHERE Clause helps to remove the records as per the condition applied.

Example: Delete based on condition

From the previous example of  Stu Table:

DELETE from Stu where Name='Shruti';

Output:

Delete

Example: Delete all records in a table

​​​​​​​DELETE from Stu;

Output:

Delete

All records in stu table has been deleted.