Hi, For H2 you will have to use two statements (one to reset row_number, and the second to run the query).
Regards, Thomas On Monday, December 7, 2015, Giplo <[email protected]> wrote: > In SQL Server I can use > > ROW_NUMBER() OVER ( ORDER BY [name] ) AS RowNumber, > > while in MySQL I use this function to emulate: > > *SELECT (@row_number:=@row_number + 1) AS RowNumber, id FROM table, > (SELECT @row_number:=0) AS t ORDER BY `name` asc* > > and works fine ... > > > but in H2 RowNumber is always 1 > > Any suggestion ...?? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
