Search for a string in all Tables and all Fields of a database with #TSQL

With below stored procedure, you can search for a string across all the tables in your database in Sql Server:

Search for a string in all Tables and all Fields of a database with #TSQL

With below stored procedure, you can search for a string across all the tables in your database in Sql Server:

And then you can call The procedure like this:

EXEC SearchAllTables 'Computer'

This will give you the list of tables and the column that has the string you passed into the stored procedure.