From the course: Introduction to SQLite
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Deleting data - SQLite Tutorial
From the course: Introduction to SQLite
Deleting data
- [Instructor] The time will inevitably come when you want to delete some data from a database table. In some ways, the semantics of deletion are similar to updating. As we did in the previous video, let's make a copy of the invoice table from the Chinook sample database. That way we won't destroy any of the original data when we make some deletions. You can use the delete statement to delete a single row. In this case, we're just deleting the one where invoice ID equals 35, but you can also delete a bunch of rows at once. This one deletes everything where the billing country is USA. Whether you update a single row or many rows depends entirely on what you put in the where clause, so be careful. If you skip the where clause, you're going to delete everything in the table. This command would be a disaster if we were working on data that we really needed. Now that you understand how to create, add, modify and delete…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.