SQL Server: Need to find the origin of a particular string value

sqlsql-serversql-server-2005tsql

Is there a way I can search for a particular string value in a SQL SERVER 2005 database? I have this image path value that I want to modify and I think it's stored in the database.

Also – is there a way that I can search for a column's name for any table in a database? Likewise, search for a tables name in a database?

Best Solution

SELECT B.*
FROM information_schema.COLUMNS B
WHERE table_name 
      IN (SELECT A.TABLE_NAME FROM information_schema.Tables A WHERE TABLE_TYPE='BASE TABLE')
      AND B.COLUMN_NAME LIKE '%yoursearchstring%'