Method1:
SELECT COLUMN_NAME,*
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'forum'
Result:
Method2:
select
syscolumns.name as [ColumnName],
sysobjects.xtype as [Objtype] from
sysobjects, syscolumns
where sysobjects.id = syscolumns.id
and sysobjects.xtype = 'u'
and sysobjects.name = 'forum'
order by syscolumns.name
0 Comments