Pages

Wednesday, December 7, 2011

How to update some records in mssql

In certain conditions, we want to update some records, not all data. Suppose we want to update the first 100 data from a query. How to do it in MSSQL??.
The following query should be executed:
update top (100) table1 set field1 = 1
Notes
Make sure you replace "table1" with the actual table name.
And replace the field1, with your column names.

No comments:

Post a Comment

Don't Forget To Join Our Community
×
Widget