Schema discovery allows applications to request managed providers to find and return information about the database schema of the database a given connection is connected to. Different database schema elements such as tables, columns and stored-procedures are exposed through the GetSchema methods of each provider's Connection class. For more information, see
http://msdn2.microsoft.com/en-us/library/kcax58fh.aspx
Schema discovery allows applications to request managed providers to find and return information about the database schema of the database a given connection is connected to. Different database schema elements such as tables, columns and stored-procedures are exposed through the GetSchema methods of each provider's Connection class. For more information, see
http://msdn2.microsoft.com/en-us/library/kcax58fh.aspx
SELECT c.[id], object_name(c.[id]) obj_name, c.colid, c.[name], t.[name] type, c.length, c.isnullable, c.xprec, c.xscale,
(select m.[text] from dbo.syscomments m where m.[id]=c.cdefault) defaultvalue,
(select p.[value] from sys.extended_properties p where p.major_id=c.id and p.minor_id=c.colid and p.[name] = 'MS_Description' ) description
FROM dbo.syscolumns c, dbo.systypes t
WHERE (c.name <> 'dtproperties')
AND c.xusertype = t.xusertype
ORDER BY obj_name, c.colid