how can I Update top 100 records in sql server

前端 未结 7 1206
醉梦人生
醉梦人生 2020-11-27 10:03

I want to update the top 100 records in SQL Server. I have a table T1 with fields F1 and F2. T1 has 200 records. I want

7条回答
  •  暖寄归人
    2020-11-27 10:46

    Note, the parentheses are required for UPDATE statements:

    update top (100) table1 set field1 = 1
    

提交回复
热议问题