**//*
一個查看表或者視圖注釋信息的方法
*/
SELECT so.[id] AS ObjectID,
so.[name] AS ObjectName, so.XType,
(CASE WHEN (LEFT(text, 2) = ''/*'')
AND (charindex(''*/'', text) > 0) THEN substring([text], 3, patindex(''%*/%'', text) - 3)
ELSE '''' END) AS Comments
FROM syscomments AS sc full join sysobjects AS so ON so.[id] = sc.[id]
WHERE so.[xtype] = ''U'' OR so.[xtype] = ''V''