使用 JPA,我试图从不同的表中获取数据,并使用查询将其放在单个结果列表中:
SELECT x.a, y.b FROM (SELECT * from a) as x, (SELECT * FROM b) as y
但是它抛出了一个异常:
Caused by: com.sap.sql.sqlparser.CommonSQLParserException: - 1:256 - SQL syntax error: not a table reference
- 1:256 - Intermediate-SQL syntax error: table reference must be a table name
- 1:261 - SQL syntax error: arguments in FROM clause of SELECT must be tables or a JOIN of tables
- 1:423 - SQL syntax error: not a table reference
- 1:423 - Intermediate-SQL syntax error: table reference must be a table name
- 1:527 - SQL syntax error: not a table reference
请就如何解决或重建上述查询提出建议。