枫云教育
您的当前位置:首页SqlServer中使用参数传递前N条条件

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

来源:枫云教育


declare @topN int ; select @topN=10; select top (@topN) * from TableName 一定要用() 否则无效 SQL 参数 declare @topN int; select @topN = 10; select top (@topN) * from TableName

  1. declare @topN int;
  2. select @topN = 10;
  3. select top (@topN) * from TableName

    一定要用() 否则无效

SQL 参数 $velocityCount-->
declare @topN int; 
select @topN = 10; 
 
select top (@topN) * from TableName 
显示全文