I have about 50 tables with created-by and changed-by referencing the user table. When I want to delete the user, I would like to create a list of what tables this user has data in, so one can go delete/edit everything belonging to said user. Is there any way of doing this in SQL?
I have about 50 tables with created-by and changed-by referencing the user table. When
Share
Not exactly sure of what you’re going for here..
If you want a list of foreign keys referencing a table try this question How can I list all foreign keys referencing a given table in SQL Server?