Oracle DELETE Statement

In Oracle, DELETE statement is used to remove or delete a single record or multiple records from a table.

Syntax

snippet
DELETE FROM table_name
WHERE conditions;

Parameters

1) table_name: It specifies the table which you want to delete.

2) conditions: It specifies the conditions that must met for the records to be deleted.

Oracle Delete Example: On one condition

snippet
DELETE FROM customers
WHERE name = 'Sohan';

This statement will delete all records from the customer table where name is "Sohan".

Oracle Delete Example: On multiple conditions

snippet
DELETE FROM customers
WHERE last_name = 'Maurya'
AND customer_id > 2;

This statement will delete all records from the customers table where the last_name is "Maurya" and the customer_id is greater than 2.

Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +