From the course: Learning Azure SQL Querying
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Deleting your data - Azure Tutorial
From the course: Learning Azure SQL Querying
Deleting your data
- [Instructor] Let's now cover the D in CRUD, which is delete. And let's delete the green helmet product that we created earlier in this course. There's no easy way to undo a delete operation. If you unintentionally delete rows or an entire table, you will likely be restoring the entire database from a backup. And if this is a live database, that can be really tricky, since restoring from a point in time backup may mean that you lose data that was added or changed since the backup was taken. Because a delete statement, and sometimes even an update statement, can be so destructive, I usually write my delete statements first as a select statement, view the results, and verify these are the records I want to delete, and then change my select statement into a delete statement. Copy and paste the select statement we used previously to find the green helmet and paste it at the bottom of this query tab. Select just this new…
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.