Sunday, June 14, 2015

Find column in table by name sql server

Use this query to find column in table by column name in SQL Server:

SELECT c.name AS ColName, t.name AS TableName
FROM sys.columns c
    JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE '%YourKeyword%'


Best Wishes,

LadyinProgramming

No comments:

Post a Comment