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.

Hi I am Paras.

Thanks for stopping by at OracleMine.com. Speaking about my brief introduction, I work for a multinational organisation in Oracle related technologies. Being an avid blogger, I would like to inform you about my productivity and motivational blog XpressPlanet.com. Speaking of OracleMine.com, I will try my best to share knowledge on technologies in as simple and understandable manner as possible. You can also contribute your knowledge on OracleMine by writing to us at hioraclemine@gmail.com. Again I appreciate your visit. Hope to see you again and again!

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.