Home >

How to find a column name in SQL Server database

3. March 2011

Sometimes, there is a need to find a column in SQL Server database, and we have no clue what so ever, where in this huge set of tables, this column would lie.

One way to quickly narrow down the search is to use this following query:

 

 

SELECT name colname FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns 
WHERE name like '%<type column name>%' )

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading