Friday, February 22, 2013

Identify Column Name in SQL

SELECT sc.[name] AS column_name ,so.[name]  FROM syscolumns sc
INNER JOIN sysobjects so ON sc.id=so.id
WHERE sc.[name] = 'Landtype'
AND so.xtype = 'U'
ORDER BY so.name

No comments :

Post a Comment