update table set top 5 type='T' where type='F'肯定不行的
不過可以這樣變換update tablea set  type='T' where id in (select top 5 id from tablea where type='F')

解决方案 »

  1.   

    UPDATE tablename
    SET type='T' 
    WHERE 排序字段 IN (SELECT TOP 5 排序字段 FROM tablename WHERE type='F')
      

  2.   

    或者這樣
    update tablea set  type='T' where checksum(*)in (select top 5 checksum(*) from tablea where type='F')
    假如上面出錯的話,原因隻可能是因為你表裡有完全一樣的數據這時候,樓主隻有通過加identity 字段,很麻煩才能實現了...
      

  3.   

    set rowcount 5
    update table set type='T' where type='F'
    set rowcount 0