Tuesday, October 25, 2016

SQL Query to fetch table name that have "Name" into column

Here I am discussing about SQL Query to find table name that have column name.

SELECT distinct INFORMATION_SCHEMA.COLUMNS.TABLE_NAME,INFORMATION_SCHEMA.COLUMNS.COLUMN_NAMEFROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%name%' 
ORDER BY TABLE_NAME

Above query fetch record and show result table as below:




No comments:

Post a Comment