แสดงบทความที่มีป้ายกำกับ Get Table Names in SQL แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ Get Table Names in SQL แสดงบทความทั้งหมด

วันพุธที่ 18 มีนาคม พ.ศ. 2552

Get Table Names in SQL

Use the following for user tables
----------------------------------------------
SELECT name
FROM dbo.sysobjects
WHERE xtype = 'U'
ORDER BY dbo.sysobjects.name
----------------------------------------------
some other types are:
'V' - views
'S' - system tables