数据库各表统计信息,记录数/占用空间

create table #Data(name varchar(100),row varchar(100),reserved varchar(100),data varchar(100),index_size varchar(100),unused varchar(100))

declare @name varchar(100)
declare cur cursor for
select name from sysobjects where xtype='u' order by name
open cur
fetch next from cur into @name
while @@fetch_status=0
begin
insert into #data
exec sp_spaceused @name
print @name

fetch next from cur into @name 

end
close cur
deallocate cur

create table #DataNew(name varchar(100),row int,reserved int,data int,index_size int,unused int)

insert into #dataNew
select name,convert(int,row) as row,convert(int,replace(reserved,'KB','')) as reserved,convert(int,replace(data,'KB','')) as data,
convert(int,replace(index_size,'KB','')) as index_size,convert(int,replace(unused,'KB','')) as unused from #data

select * from #dataNew order by data desc

Posted in 数据库 at January 22, 2017. by 傻猫 .    Views: 1726    No Comments

mssql里求数据库中所有表的记录数

create table #temp(name varchar(50),count int)
declare @tablename varchar(50),@sql varchar(500)
declare gettablenum_cur cursor for select name from sysobjects where xtype='u'
open gettablenum_cur
fetch gettablenum_cur into @tablename
while @@fetch_status=0
begin
select @sql='insert #temp(name,count) '+'select '+''''+@tablename+''''+','+'count(1) from '+@tablename
exec(@sql)
fetch gettablenum_cur into @tablename
end
select * from #temp order by name
close gettablenum_cur
deallocate gettablenum_cur
drop table #temp

Posted in 数据库 at January 22, 2017. by 傻猫 .    Views: 1591    No Comments

《小猪佩奇、粉红猪小妹、Peppa Pig》高清1080p 中英文原版下载

《小猪佩奇》《粉红猪小妹》《Peppa Pig》介绍:

《Peppa Pig》是一部超级受欢迎的英国学龄前儿童动画片系列。故事围绕红猪小妹的日常生活展开,家长和孩子们可以通过动画片学到许多常见的生活用语,而且还能体会到英国的日常生活和西方文化。画面干净画风简单,清新且色彩明亮饱和,剧情温馨有趣,语速适中,日常用语丰富,是一部非常好的启蒙英语动画片,适合2-6岁的小朋友。

《Peppa Pig》自2004年在英国的FIVE和NICK JR.电视台首播后,全球超过120个国家的电视频道也相继播映。荣获2005年法国Annecy国际动画展Cristal「最佳电视制作奖」;意大利Cartoons on the Bay动画展Pulcinella「最佳幼儿影集奖」「年度最佳欧洲节目」。

《Peppa Pig》从2004年5月到2012年12月共播出4季211集,每集5分钟。

查看更多内容...

Posted in 休闲娱乐 at January 12, 2017. by 傻猫 .    Views: 53437    No Comments