Posted in
Windows Server |
No Comment | 1,843 views | 10/11/2015 15:01
If you need to get all table column names from MSSQL database, you can use following query:
SELECT
o.name, c.name
FROM sys.columns c
INNER JOIN sys.objects o ON c.object_id=o.object_id
ORDER BY o.name, c.column_id |
select
o.name, c.name
from sys.columns c
inner join sys.objects o on c.object_id=o.object_id
order by o.name, c.column_id
That will output all column names.