Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Query All Table Or Column Names in SQL Server

Tags: ssms, t-sql, sql-server

Query Table Names

SELECT * 
FROM INFORMATION_SCHEMA.TABLES
WHERE Table_Name LIKE '%foobar%' 

Query Column Names

SELECT * 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%foobar%'