| Naomi's Blog |
One of the common questions I encounter in the different SQL related forums is "How to search all columns in all tables in the database". My usual answer is to refer people to the Question #2 in this blog The ten most asked SQL Server questions. However, the recent thread in MSDN forum forced me
to re-evaluate the solution I knew about and come up with my own solution.
At first, I would like to demonstrate the solution I came up with and then I'll show how we can expand it.
Search for a string value in all columns of a table
-- First declare variables for test
declare @Table_Name sysname, @SearchString nvarchar(max)
--...(Read whole news on source site)




