一个SQL语句


select a.tabname,a.nrows,b.colname

from systables a,syscolumns b

where a.tabid=b.tabid and b.coltype=10 and substr(a.tabname,1,3)<>'sys' and substr(a.tabname,1,3)<>'mat' and a.nrows>100000;

将数据库非系统表中含有日期类型字段,并且记录条数大于十万条的表选出来。

要先做一边update statistics

Published At
Categories with 数据库类
comments powered by Disqus