Any idea how I can update a column, but only for row number=1 to row number=10 for example?
row number=1
row number=10
This uses a view to isolate the 10 rows that you want to update. Note: they both have ORDER BY to define 10 rows
UPDATE T SET SomeColumn = @newValue --or constant etc FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY something) AS rn FROM SomeTable WHERE ... ) T WHERE rn <= 10
Typically, on an Sql server, an update statement is written as
Update <Table Name> Set <Column Name> = <Value> where <Search Condition>.
Source: https://habr.com/ru/post/892973/More articles:where can i find full access to Office xml? - .netFind all regex capture groups - regexAndroid - methods in DialogListener attached to Facebook.authorize () do not get there - androidRemoving TextChangedListener and then re-adding - androidWhat is the best approach for creating a high quality PDF from XML? - xmlHow is null implemented in Java? - javajoomla - how can I create new content types in joomla - joomlaWhat are yii user management modules? - phpphp - dynamically create an array initialized with N null elements - arraysHow to get an exception message in the future: future? - c ++All Articles