DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Search For All Column Names That Contain A Certain String Within MS SQL Server 2005

10.22.2008
| 7661 views |
  • submit to reddit
        Search for all column names that contain a certain string within MS SQL Server 2005
Select O.name objectName, C.name ColumnName from sys.columns C inner join sys.objects O ON C.object_id=O.object_id where C.name like ‘%ColumntoFind%’ order by O.name,C.name