You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following query generates a SQL syntax error in most databases:
create().select()
.from(TBookToBookStore()
.divideBy(TBookStore())
.on(TBookToBookStore_BOOK_STORE_NAME().equal(TBookStore_NAME()))
.returning(TBookToBookStore_BOOK_ID())
.as("x")) // Aliasing is not possible
.fetchOne(0, Integer.class);
... which renders as such
select*from ((
select distinct"dividend"."book_id"from"public"."t_book_to_book_store"as"dividend"where not exists (
select1from"public"."t_book_store"where not exists (
select1from"public"."t_book_to_book_store"where (
"dividend"."book_id"="public"."t_book_to_book_store"."book_id"and"public"."t_book_to_book_store"."book_store_name"="public"."t_book_store"."name"
)
)
)
) as"alias_40930429") as"x"
The error obtained is this:
Caused by: org.postgresql.util.PSQLException: FEHLER: Syntaxfehler bei »)«
The reason is that in most SQL dialects, it is not allowed to doubly-nest derived tables with aliases
The text was updated successfully, but these errors were encountered:
The following query generates a SQL syntax error in most databases:
... which renders as such
The error obtained is this:
The reason is that in most SQL dialects, it is not allowed to doubly-nest derived tables with aliases
The text was updated successfully, but these errors were encountered: