Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search column name 1

Status
Not open for further replies.

peac3

Technical User
Joined
Jan 17, 2009
Messages
226
Location
AU
Hi guys,

I have a table which contains few hundreds of columns and am trying to find the column name like '%amount%'
Is there any easy way to do this? other than manual search.

Thanks guys,
 
Code:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE Table_Name = 'TheTableName' AND
      Column_Name LIKE '%amount%'

Borislav Borissov
VFP9 SP2, SQL Server 2000,2005 & 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top