Unexpected token: ROW_NUMBER

  • Tom Anderson

    Tom Anderson - 2014-06-26

    Using HSQLDB v2.3, the docs for which say that ROW_NUMBER() is supported.
    However, I am getting the following:

    java.sql.SQLException: Unexpected token: ROW_NUMBER in statement [select * from (select row_number() over (partition by....
    at org.hsqldb.jdbc.Util.throwError(Unknown Source)
    at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)

  • Fred Toussi

    Fred Toussi - 2014-06-27

    Try this syntax:

    SELECT * FROM (SELECT row_number() over() FROM Customer)

    It does not support PARTITION BY


Log in to post a comment.