日期:2014-05-18 浏览次数:20529 次
select * from tb where num>(select count(*) from table1)
------解决方案--------------------
可以用动态语句
declare @sql int
set @sql='select count(1) from table1'
...
------解决方案--------------------
declare @a int set @a=(select count(*) from table1)
------解决方案--------------------
declare @n int
set @n = (select count(*) from XXtable)