top数为变量时

declare @intTop int
set @intTop=2
print @intTop

--set rowcount @intTop
--select * from [dbo].[Demo_Values]
select top @intTop * from [dbo].[Demo_Values]

04-14 07:28