Column "NB" not found; SQL statement: select top nb label from foo [42122-192]

Samebug tips1


Check if you're not creating unused SQL entities, as it might cause this exception.


Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web827

  • via Stack Overflow by Stephan
  • via Stack Overflow by ETN
  • Stack trace

    • org.h2.jdbc.JdbcSQLException: Column "NB" not found; SQL statement: select top nb label from foo [42122-192] at org.h2.message.DbException.getJdbcSQLException( at org.h2.message.DbException.get( at org.h2.message.DbException.get( at org.h2.expression.ExpressionColumn.optimize( at org.h2.command.Parser.parseSelectSimpleSelectPart( at org.h2.command.Parser.parseSelectSimple( at org.h2.command.Parser.parseSelectSub( at org.h2.command.Parser.parseSelectUnion( at org.h2.command.Parser.parseSelect( at org.h2.command.Parser.parsePrepared( at org.h2.command.Parser.parse( at org.h2.command.Parser.parse( at org.h2.command.Parser.prepareCommand( at org.h2.engine.Session.prepareLocal( at org.h2.engine.Session.prepareCommand( at org.h2.jdbc.JdbcConnection.prepareCommand( at org.h2.jdbc.JdbcStatement.executeInternal( at org.h2.jdbc.JdbcStatement.execute( at org.h2.server.web.WebApp.getResult( at org.h2.server.web.WebApp.query( at org.h2.server.web.WebApp$ at org.h2.server.web.WebApp$ at org.h2.server.web.WebThread.process( at at Source)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    2 times, last one,
    34 times, last one,
    4 times, last one,
    143 more bugmates