sql select column name like from multiple tables

Solutions on MaxInterview for sql select column name like from multiple tables by the best coders in the world

showing results for - "sql select column name like from multiple tables"
Alan
16 Jan 2018
1USE AdventureWorks 
2GO 
3SELECT t.name AS table_name,
4SCHEMA_NAME(schema_id) AS schema_name,
5c.name AS column_name
6FROM sys.tables AS t
7INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
8WHERE c.name LIKE '%EmployeeID%'
9ORDER BY schema_name, table_name; 
10