SqlServer中使用参数传递前N条条件

declare @topN int;   
select @topN = 10;   
  
select top (@topN) * from TableName  

编程技巧