set rowcount @参数
select  * from table
for xml path('row'),root('table'),type

解决方案 »

  1.   

    select  top (@参数)* from table
    for xml path('row'),root('table'),type
    這樣 ?
      

  2.   

    什么意思select * from table
    for xml path('row'),root('table'),typeset rowcount @参数

      

  3.   

    exec('select  top ('+ltrim(@参数)+')* from table
    for xml path('row'),root('table'),type')
      

  4.   

    exec('select top ('+ltrim(@参数)+')* from table for xml path(''row''),root(''table''),type')