[h2] Re: int not 100% continuous

2022-12-18 Thread mche...@gmail.com
thank you very much :-) On Sunday, 18 December 2022 at 19:47:59 UTC+8 Evgenij Ryazanov wrote: > Hi! > > If you don't care about exact ordering, the fastest way is > UPDATE tableName SET columnName = ROWNUM(); > > If you want to preserve it, a slower command is needed: > MERGE INTO tableName USING

[h2] Re: int not 100% continuous

2022-12-18 Thread Evgenij Ryazanov
Hi! If you don't care about exact ordering, the fastest way is UPDATE tableName SET columnName = ROWNUM(); If you want to preserve it, a slower command is needed: MERGE INTO tableName USING (SELECT columnName, ROW_NUMBER() OVER(ORDER BY columnName) FROM tableName) T(columnName, R) ON tableName.c