SQL-Search For A Column Name In All Tables In a Database


If you would like to search all tables in  a database for a particular column name, here's a sample query for that:

SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS 
WHERE COLUMN_NAME LIKE '%EmployeeNo%' 
ORDER BY TABLE_NAME

Here the column name  been searched for is -'EmployeeNo'
Previous
Next Post »
0 Komentar

ASP.NET - How To Display Animated .GIF On Postback

When designing an interactive web page, it is important for you to let the user know that  an action initiated by him/her is in progress.One...