说一下几种思路:一、如果你的表名是有规律的,就用循环组合成sql,再执行。如:declare @i int,@sql varchar(1000)set @i=1 while @i<10 begin set @sql='select count(*) from table'+convert(varchar,@i)ex....
用sql获取数据库中所有的表名的方法:1、oracle下:select table_name from all_tables;2、MySQL下:select table_name from information_schema.tables where table_schema='csdb' and ta...