参考下列方法可以获得每个表格的数据数目。
use pubs -- 可改成您的数据库名称
set nocount
ondeclare tables_cursor cursor
for
select name from sysobjects where type = 'u'
open tables_cursor
declare @tablename varchar(30), @quote char(1)
select @quote = '"'
fetch next from tables_cursor into @tablename
while (@@fetch_status <> -1)
begin
exec ("select " + @quote+"rows in " + @tablename + " = "+ @quote + ", count(*) from "+ @tablename)
fetch next from tables_cursor into @tablename
end
deallocate tables_cursor
set nocount off
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器