That's what I was afraid of. In this table, there are so many relations that it would be very difficult to check all of them. I'll just have to deal with it from my calling code.
>I don't believe that there is anyway to prevent SQL Server from raising the error. Your option is probably to test to see if the delete would cause a problem. This, of course, requires that you embed the relationships within your stored procedure:
>
>IF NOT EXIST(SELECT * FROM books WHERE au_id = @author)
>BEGIN
> DELETE FROM authors WHERE au_id = @author
>END
>
>-Mike