摘要:查詢所有資料表及欄位名稱
select sysobjects.name as Table_Name,
syscolumns.name as Column_Name
from sysobjects join syscolumns on sysobjects.id = syscolumns.id
where (sysobjects.xtype = 'U')
order by sysobjects.name asc,/*依資料表名排序*/
syscolumns.colid asc;/*依欄位順序排序*/