SQL 数据库中所有的用户表,一个表的中的所有列信息 的SQL

SELECT OBJECT_NAME (id) [OBJECT_NAME] FROM sysobjects WHERE xtype = 'U' AND OBJECTPROPERTY (id, 'IsMSShipped') = 0

SELECT a.name ColName,b.name TypeName,a.length Length from  syscolumns a
INNER JOIN sysobjects d ON a.id=d.id AND d.xtype='U' AND d.name<>'dtproperties'
LEFT JOIN systypes b ON a.xtype=b.xusertype
WHERE
 d.name = '{0}'

posted on 2007-05-14 21:28  小肠与小豆子  阅读(459)  评论(0编辑  收藏  举报

导航