Skip to main content
Source Link
user126897
user126897

akina: You need to emulate ROW_NUMBER(). There are 2 general ways:

  1. Subquery which uses 2 table references (see, for example, Order by is ignored if inside a derived table of a update, with the correction that the subquery must be moved to main query's UPDATE clause); and
  2. Subquery which uses user-defined variables (see, for example, query to replace text with sequential numbers).
Post Made Community Wiki by user126897