查看表

查看表


查看数据库中的所有表

select * from sysobjects where xtype='u' order by name asc

--查询数据库的所有表信息

select * from sysobjects where type='U';

--列出表里的所有的列名

select * from syscolumns where id = object_id('ta1');

--查询数据库表数据条数

select

    distinct a.name AS 表名,b.rows AS 数据行数

from sys.objects a,sysindexes b

where a.object_id=b.id and a.type='u'and b.rows = 0;

猜你喜欢

转载自www.cnblogs.com/Aha-Best/p/10869857.html
今日推荐