From the course: Microsoft SQL Server 2022 Essential Training
Unlock this course with a free trial
Join today to access over 24,100 courses taught by industry experts.
Solution: Remove and update records in a table - SQL Server Tutorial
From the course: Microsoft SQL Server 2022 Essential Training
Solution: Remove and update records in a table
(upbeat music) - [Instructor] For this challenge, we are tasked with updating the data in a table about event bookings for a hotel. I'm just going to run the SELECT statement here to see everything that's in the EventRegistrations table to get started. And that'll show me that I have 20 different events here and I can see the columns for the registration ID, attendee name, the registration date, and their status, as well as the event name and the event date. So these are all the different events and the people who are scheduled to attend or have at least express an interest. Some of them are attending and some of them are not. So that is listed in the status column. So that is our starting data and we're asked to make some changes to this data table. So let's just get started with the first change. We are told that the Global Marketing Summit event has been canceled and we need to remove all of the records for that event from the database. All right, let me go across here and take a…
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
-
-
-
-
-
-
-
Understand the role of T-SQL2m 40s
-
(Locked)
Use the T-SQL editor6m 49s
-
(Locked)
Create a table with T-SQL6m 33s
-
(Locked)
Solution: Create tables with T-SQL commands3m 46s
-
(Locked)
Add data to a table4m 58s
-
(Locked)
Solution: Add data with T-SQL commands3m 4s
-
(Locked)
Retrieve records with SELECT4m 3s
-
(Locked)
Solution: Query data in a database2m 7s
-
(Locked)
Filter returned results with WHERE3m 12s
-
(Locked)
Sort records2m 54s
-
(Locked)
Solution: Filter and sort data with a query4m 27s
-
(Locked)
Delete records from a table4m 31s
-
(Locked)
Update records in a table2m 3s
-
(Locked)
Solution: Remove and update records in a table6m 11s
-
(Locked)
Joining related tables4m 32s
-
(Locked)
Solution: Query information from related tables5m 33s
-
(Locked)
Remove a table from the database5m 7s
-
-
-
-
-
-