如下:
select top 2 * from table1
转变成
select top @num * from table1
总是提示@num错误
如何解决?
exec('select top '+@num+' * from table1')
或
set rowcount @num
select * from table1
set rowcount 0