Column Search in a database

  • Do anyone have a simple query that I can use to search for a column in a database with a number of tables? Mind you I do not know the table which the column is.

  • Try something like this. This will give you all the tables, and/or views that the column is used in.

    select table_name from information_schema.columns where column_name = 'mycolumn'

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply