Delete from table SQL query

DELETE FROM table_name;

/* dellete based on condition */

DELETE FROM table_name WHERE column_name = 'value'

Delete query in SQL is used to delete all records or some records based on provided condition using WHERE clause. If you want to delete all records you don't need to use WHERE clause in your query as shown in the code snippet.

Was this helpful?