Searching Database for Column Names

2015-09-01 SQL Andrew B. Collier

How to find a table which has a column name matching a certain pattern? I am trying to find my way around a new SQL Server database and I wanted to find all columns with the word “Default” in their name.

SELECT AS TableName, AS ColumnName
				sys.columns AS columns
				sys.tables AS tables
				tables.OBJECT_ID = columns.OBJECT_ID
WHERE like '%Default%';
Next: MonthOfJulia Day 3: Variables and Data Types.
Previous: MonthOfJulia Day 2: Development Environments.