最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
获得所有表信息的SQL语句
时间:2022-07-02 09:32:42 编辑:袖梨 来源:一聚教程网
exec sp_MSForEachTable
@precommand=N'
create table ##(
id int identity,
表名 sysname,
字段数 int,
记录数 int,
保留空间 Nvarchar(10),
使用空间 varchar(10),
索引使用空间 varchar(10),
未用空间 varchar(10))',
@command1=N'insert ##(表名,记录数,保留空间,使用空间,索引使用空间,未用空间) exec sp_spaceused ''?''
update ## set 字段数=(select count(*) from syscolumns where id=object_id(''?'')) where id=scope_identity()',
@postcommand=N'select * from ## order by id drop table ##'
@precommand=N'
create table ##(
id int identity,
表名 sysname,
字段数 int,
记录数 int,
保留空间 Nvarchar(10),
使用空间 varchar(10),
索引使用空间 varchar(10),
未用空间 varchar(10))',
@command1=N'insert ##(表名,记录数,保留空间,使用空间,索引使用空间,未用空间) exec sp_spaceused ''?''
update ## set 字段数=(select count(*) from syscolumns where id=object_id(''?'')) where id=scope_identity()',
@postcommand=N'select * from ## order by id drop table ##'
相关文章
- 洛克王国世界雪境宝箱在哪里 雪境宝箱具体位置 10-14
- 洛克王国世界神圣狮鹫在哪 神圣狮鹫捕捉位置 10-14
- 洛克王国世界可可果树在哪里 可可果树具体位置 10-14
- 二重螺旋深渊boss怎么打 深渊boss打法教学 10-14
- 蓝色星原旅谣寒悠悠怎么样 寒悠悠角色介绍 10-14
- 蓝色星原旅谣PVP怎么玩 PVP玩法介绍 10-14