http://xiangai.taobao.com
http://shop148612228.taobao.com

sql server 查询数据库中有多少个表

 

 

SELECT * FROM sysobjects WHERE (xtype = 'U')

SELECT * FROM sysobjects WHERE (xtype = 'U')

SELECT * FROM sysobjects WHERE (xtype = 'C')

SELECT * FROM sysobjects WHERE (xtype = 'D')

SELECT * FROM sysobjects WHERE (xtype = 'F')

SELECT * FROM sysobjects WHERE (xtype = 'L')

 SELECT * FROM sysobjects WHERE (xtype = 'FN')

SELECT * FROM sysobjects WHERE (xtype = 'IF')

SELECT * FROM sysobjects WHERE (xtype = 'P')

SELECT * FROM sysobjects WHERE (xtype = 'PK')

SELECT * FROM sysobjects WHERE (xtype = 'RF')

SELECT * FROM sysobjects WHERE (xtype = 'S')

SELECT * FROM sysobjects WHERE (xtype = 'TR')

SELECT * FROM sysobjects WHERE (xtype = 'U')

SELECT * FROM sysobjects WHERE (xtype = 'UQ')

SELECT * FROM sysobjects WHERE (xtype = 'V')

SELECT * FROM sysobjects WHERE (xtype = 'X')

  --C = CHECK 约束

--D = 默认值或 DEFAULT 约束

--F = FOREIGN KEY 约束

--L = 日志 --FN = 标量函数

--IF = 内嵌表函数

--P = 存储过程

--PK = PRIMARY KEY 约束(类型是 K)

 --RF = 复制筛选存储过程

--S = 系统表

--TF = 表函数

--TR = 触发器

--U = 用户表

--UQ = UNIQUE 约束(类型是 K)

--V = 视图

--X = 扩展存储过程

posted @ 2011-11-08 09:44  万事俱备就差个程序员  阅读(794)  评论(0编辑  收藏  举报

http://xiangai.taobao.com
http://shop148612228.taobao.com
如果您觉得对您有帮助.领个红包吧.谢谢.
支付宝红包
微信打赏 支付宝打赏