Sql语句中使用参数化的Top

在sql中使用参数化的Top,Top后面的参数要用括号括起来。

例如:

select top (@ts) ID, [Type], Title, Content, LinkMan, Tel, CheckState, [Date] from tb_Frinfo where [Type] = @type order by [Date] Desc
原文地址:https://www.cnblogs.com/KTblog/p/4375870.html