Conclusion

In this chapter, you learned to create a stored procedure that modifies data in your database tables. First, you saw how important it is to maintain relationships between your database tables. Then, you saw how to create a stored procedure that updates tables. This stored procedure checks all relationships on related tables and then makes the changes. Next, you learned to create a stored procedure that deletes data from your table. As does the first procedure, this procedure checks relationships and deletes data based on that. Last, you saw how to create a stored procedure that generates the code that makes a stored procedure that updates the table that you pass in.

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.