From the course: Complete Guide to Advanced SQL Server
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Add error handling and test the system: Part 1 - SQL Server Tutorial
From the course: Complete Guide to Advanced SQL Server
Add error handling and test the system: Part 1
The final step in our Game Scores database project is to test out some edge cases to make sure that the system functions as we intended, and to handle any error situations that we discover. So I'm going to start by just going with a known good scenario. We've run this kind of a query a couple of times now with this kind of insert. So we're just going to insert a single row into the score events table, and this will be to increment player ID number two's score by 125 points. So I'm going to insert that row into the table, and I get my three messages being generated by those triggers. So everything is working with this. I can select everything out of our three tables and we can see where we currently stand. So we have all of our score events here, including the new one that we just entered there for player number two, we have the current scores for each of our two players, and then we also have the new global score that was just updated with that insert. So we have a system that we know…
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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
GameScore database final project setup2m 38s
-
(Locked)
Create a trigger to add points to player records6m 30s
-
(Locked)
Calculate global score with custom function4m 7s
-
(Locked)
Write a stored procedure: Part 16m 19s
-
(Locked)
Write a stored procedure: Part 24m 44s
-
(Locked)
Add error handling and test the system: Part 16m 14s
-
(Locked)
Add error handling and test the system: Part 25m 52s
-
-