You can execute the
DELETE statement to delete records from a table.
DELETE FROM table_name [ WHERE condition ]
- The table on which you execute the
DELETEstatement must have a primary key.
- You cannot use the alias of a table to execute the
- If you need to delete all records or all partitions from a table, we recommend that you use the
TRUNCATE PARTITIONstatement, instead of the
- Delete the record where
Alexfrom the customer table.
DELETE FROM customer WHERE customer_name='Alex';
- Delete the records where age is less than 18 from the customer table.
DELETE FROM customer WHERE age<18;