Select 'Select createdUserID From [' + Table_Name + '] Union'
From Information_Schema.Columns
Where Column_Name = 'createdUserID'
Notice that the output will a a row for each table that has this column. Also notice the UNION keyword on the end of each row. Copy/Paste the output of the above script to a new query window, remove the UNION keyword from the last select statement, and then run it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.