Verifying the Data to Be Modified

When you add data into your database tables, you frequently check the data that you are adding to ensure that the added data falls in the ranges accepted in your database and your applications. You perform similar steps when you modify data in your database. It is much more important to perform data verification and validation because existing data is often referenced in some way by other tables in the database. If you don't check to see what data is being referenced and how, you can run into major problems. If some piece of data that's being referenced is changed, and you don't check to see whether that data is being referenced, the reference is broken and an orphan is created. An orphan is a piece of data 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.