I have one Employee table in my Database which has relations to different other tables. In my application, When a user try to delete one employee which has relational data in other tables, I want to display a list of that tables to the user. Can I list all table names which prevents the Employee to be deleted (relational data Tables) using a query?
-
1You can do with sys tables (check this stackoverflow.com/questions/8094156/… ), but in realtime that can be performance botteneck. I would suggest to return this list manually or let exception thrown having proper rollback mechanism.Anil– Anil2015-05-07 06:40:30 +00:00Commented May 7, 2015 at 6:40
Add a comment
|