ORACLE | ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
|
Oracle - Delete
In Oracle, DELETE statement is used to remove or delete a single record or multiple records from a table.
DELETE FROM table_name
WHERE conditions;
Lets take an example of table containing 'customers' info to perform delete query :
Customer_id | name | lastname | city |
---|---|---|---|
1 | Meherish | Chowdary | Gujarat |
2 | Ajaashi | Nehra | Maharashtra |
3 | Kaivalya | Bhoopalam | Karnataka |
DELETE FROM customers
WHERE name = 'Kaivalya';
As a result,table displays as follows :
Customer_id | name | lastname | city |
---|---|---|---|
1 | Meherish | Chowdary | Gujarat |
2 | Ajaashi | Nehra | Maharashtra |
DELETE FROM customers
WHERE last_name = 'Nehra'
AND customer_id = 2;
As a result,table displays as follows :
Customer_id | name | lastname | city |
---|---|---|---|
1 | Meherish | Chowdary | Gujarat |