diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml index a5fa8ffd76..60efe895e4 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml @@ -6814,8 +6814,25 @@ create.select().from(values( row(1, 2), row(3, 4) ).as("t", "a", "b")) -.fetch();]]> - +.fetch();]]> + +
+ The
+ Most databases do not support unnamed derived tables, they require an explicit alias. If you do not provide jOOQ with such an explicit alias, an alias will be generated based on the derived table's content, to make sure the generated SQL will be syntactically correct. The generated alias is not specified and should not be referenced explicitly. +
++ In most SQL databases, aliasing of column expressions in top level selects is optional. The database will generate a column name that is roughly based on the expression for documentation purposes (e.g. when running the query in a tool like SQL Developer), but applications cannot rely on the name explicitly. This is not a problem as columns can still be referenced by index. +
+ ++ In a similar fashion, jOOQ will assume an unspecified, generated column name for column expressions, based on their content. +
+ + +
+ These unnamed expressions can be used both in SQL as well as with jOOQ. However, do note that jOOQ will use
"double quotes", `backticks`, or [brackets])- For the above reasons, jOOQ by default quotes all names in generated SQL to be sure they match what is really contained in your database. This means that the following names will be rendered + For the above reasons, and also to prevent an additional SQL injection risk where names might contain SQL code, jOOQ by default quotes all names in generated SQL to be sure they match what is really contained in your database. This means that the following names will be rendered