如何查询库中哪些表有数据
用dbexport出来,然后看哪些表有数据这种办法就别说了。。。 select tabname from systables where nrows = 0; 原帖由 xjfirst 于 2008-3-13 18:28 发表 http://bbs.chinaunix.net/images/common/back.gifselect tabname from systables where nrows = 0;
在没有做 update statistics 之前,这么做可能是不对的。 原帖由 ivhb 于 2008-3-13 19:19 发表 http://bbs.chinaunix.net/images/common/back.gif
在没有做 update statistics 之前,这么做可能是不对的。
楼上说的太有道理了。 先做个update statictics 原帖由 czw1413_cn 于 2008-4-14 13:03 发表 http://bbs.chinaunix.net/images/common/back.gif
select "select count(*) from "||tabname from systables where tabid>99
把得到的内容执行一下
能不能解释一下?
回复 #7 wstar 的帖子
select "select count(*) from "||tabname from systables where tabid>99其中的select tabname from systables where tabid>99;
就表示是数据库的所有表...
"select count(*) from " 仅是做为普通字符输出而已..
即select count(*) from <tabname>. count(*)大于0当然是有数据啰~~ 我不太懂哈,难道不能看看表占了多大空间吗,把占空间是0的通通剃掉不久结了
页:
[1]