/* extendedpropertyに予め値を入れておくと管理がしやすい MS_Description = テーブル名 Description = テーブルの用途などの説明 */ select ROW_NUMBER() over (order by A.Name) as TableNo, A.id, A.Name as TableName, D.value as TableNameJa, D2.value as TableDescription, A.crdate from sys.sysobjects A left join sys.extended_properties D on D.major_id = A.id AND D.minor_id = 0 left join (Select * From sys.extended_properties where Name='Description') D2 on D2.major_id = A.id AND D2.minor_id = 0 where A.xtype='U' order by A.Name