Skip to content
Advertisement

Unknown column sql error while using jooq

Query:

Error:

Database: MYSQL, Database Name: ‘users’, JOOQ Version: 3.16.6

Advertisement

Answer

Correlating derived tables isn’t supported in MySQL 5.7. Support has been added only in MySQL 8.0.14: https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html

jOOQ currently can’t work around this limitation, see: https://github.com/jOOQ/jOOQ/issues/12045

The solution is either:

  • Upgrade your MySQL version
  • Use a MULTISET_AGG based approach instead
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement