Deleting data
Now that we've got data and can query it, what if we need to get rid of it?
Deleting is really pretty simple. The SQL statement looks as follows:
DELETE FROM tableName [WHERE condition ...]
This will delete whatever rows match the conditions you supply and leave the rest. If no conditions are supplied, all the rows are removed.
We're not going to go over how to use this command in JavaScript; it uses the same executeSql
method you're already familiar with. If you do want to see some code, you can look at the example snippets in the code package of this book.