Thursday, October 26, 2017

Update First N records is Sql Server table

For selecting first N records we simply has query..

SELECT TOP N * FROM TABLE1

but for updating first N records of table1 we have query like

UPDATE TOP(N) TABLE1
SET FIELD1 = VALUE1

No comments:

Post a Comment