SQL delete statement with example

SQL delete statement allows deleting some values from an existing table.

Input data Employees Table:

Assignment: delete employees with age less than 22

SQL command: Delete from employees where age in (select age from employees_b where age<=22);

employees_b is just a copy of employees Table.

Output Table:

subquery Delete input Data


Related Articles

Leave a Reply

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

Back to top button