您好,欢迎来到意榕旅游网。
搜索
您的当前位置:首页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 

Copyright © 2019- yrrf.cn 版权所有 赣ICP备2024042794号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务