From the course: SQL Server 2014 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
DELETE statements - SQL Server Tutorial
From the course: SQL Server 2014 Essential Training
DELETE statements
- In this section, I'm going to demonstrate how to remove rows from a table, how to remove one or more entire rows from a table by using a delete statement. So again, we're gonna work with humanresources.department. And we can explore that table real quickly by doing a select store from the table. When we execute that, we'll see all the rows returned, including the one at the bottom that we added a few exercises back. We added the database administrators record. We're gonna go ahead and delete that now. We'll open up a new query. We'll use the keyword delete. And then we don't need to specify any columns. None of the delete functionality works on a column-by column basis. It's going to delete the entire row, so we don't have to specify which columns we're trying to delete. We can jump right to the from part, and this will be from humanresources.department. But don't execute this just yet. If you execute it as is, it would delete all of the records from humanresources.department, which…
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.
Contents
-
-
-
-
-
-
-
-
(Locked)
What is SQL?3m 34s
-
(Locked)
Basic SELECT statement3m 35s
-
(Locked)
Filtering results with a WHERE clause3m 48s
-
(Locked)
Using wildcards in a WHERE clause2m 38s
-
(Locked)
Sorting results with ORDER BY4m 48s
-
(Locked)
INSERT statements4m 24s
-
(Locked)
UPDATE statements3m 12s
-
(Locked)
DELETE statements2m 42s
-
(Locked)
-
-
-
-
-
-
-
-
-