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

 

posted on 2015-03-29 16:43  ultrastrong  阅读(477)  评论(0编辑  收藏  举报