Delete Statement in Oracle

Delete statement in Oracle is used to delete existing records of the table.

You can delete a specific number of rows or all rows from the table.

Delete is classified as DML (Data Manipulation Language) statement by Oracle.

DELETE Statement

Syntax

DELETE FROM [schema_name.]table_name
 WHERE condition_1
   AND condition_2
   AND subquery_condition_3
   .....
   .....
   AND condition_n;

Parameters Explanation

schema_name (optional)

  • Schema of the table

table_name

  • Table name from which rows are to be deleted

condition_1, condition_2…condition_n

  • Conditions to filter the data

subquery_condition_3

  • Sub-query condition

Example

  • Delete all rows from the table
DELETE FROM employees;
  • Delete specific rows from the table
DELETE FROM employees WHERE dept_id=30;

This query deletes records of dept_id 30 from employees table

I hope you like the page and find it useful. We highly appreciate comments and feedback.

You can also Subscribe here to stay updated on latest posts of OracleMine.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.