Use the DELETE FROM statement to remove rows from a table. The WHERE clause determines which rows are removed.
- [Narrator] You'll use the DELETE FROM … statement to delete rows from a table. … Here we're using the test database … and in the previous lesson we created a test table … and we added some rows to it, it looks like this. … So here's our test table, it has three columns A, B, and C. … The A column is integers and the … B column and C columns are text. … So you can use the DELETE FROM statement … to delete a row like this. … This will delete the row that has … the integer value three in the A column. … So go ahead and execute that and then we SELECT again … you'll see that that row is now gone. … Deleting rows is destructive, that is once … they're deleted they cannot be easily recovered. … So if you're typing SQL directly … as we are here in this tutorial, … it's a good idea to audition your … WHERE clause with a SELECT statement like this. … I can say SELECT asterisk FROM test WHERE … and then I put in my WHERE clause, … the rows that I want to delete and so … if I execute this SELECT statement …
This course was created by Bill Weinman. We are pleased to offer this training in our library.
- How databases are organized
- Selecting rows and columns
- Creating new tables
- Inserting and updating data
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Using CRUD functions
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times2m 6s
11. Views and Subselects
12. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.