In this tutorial, we will learn about the SQLite DELETE Statement. The DELETE statement is used to delete the existing records from the database table. We can use the WHERE clause to delete selected rows.
SQLite Delete Statement
The general syntax of the DELETE statement is as follows:
DELETE FROM table_name
All table rows will be deleted when we omit the WHERE clause.
Consider the following employee emp table. In this example, we will delete Jennifer Lawrence’s employee record.
Identify the employee number of Jennifer Lawrence. It is empno = 8. We can use this condition in the WHERE clause.
sqlite> DELETE FROM emp
…> WHERE empno = 8;
This will delete a single row from the emp table. This is because the condition specified in the WHERE clause empno = 8 is true only for Jennifer Lawrence’s employee record.
We can verify that the row got deleted using the SELECT command.
SQLite tutorials on this website:
For more information on SQLite, visit the official website: