From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Deleting records from tables - SQL Tutorial
From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced
Deleting records from tables
- [Presenter] To make any space for a new data to come, sometimes you want to delete the old items and whenever you want to delete the old items from your table, you can use the delete statement. We have seen insertion, we have seen updation. Now let's see the deletion on how you can delete the specific records from the table. Let's go back to our pgAdmin. For deleting any records from your table, you can use the delete command. So you use delete, and then you have to tell from which table you want to delete. So you will say delete from and then you will use table name. Now the table name here is Products. Now if you just execute this specific statement, what it will do is it will try to delete all the items from the table or all the records from the table. And I'm sure you don't want to do that, right? So if you want to delete a specific item from the table, you need to use the where clause because with the help…
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.