Allow unqualified asterisk and other expressions in the select list
Details
| Detail name | Value |
|---|---|
| Changelog Number | 2537 |
| Type | Improvement |
| Status | Resolved |
| Fix Versions | Exasol 2026.1.0, Exasol 2025.2.1 |
| Resolution Date | 2026-03-20 |
Background
The select list for a query can be either an unqualified asterisk, “{}”, which represents all columns from the FROM clause, or a list of expressions (including qualified asterisks such as T.) given by the user, but not both. This is the behavior described in the 2016 SQL Standard.
However, it would be useful to be able to select both an unqualified asterisk and other expressions, in order to project everything from the FROM clause plus some calculated columns.
Improvement
We made a change to allow the select list to contain unqualified asterisks as well as other expressions. This is an extension to the SQL Standard.
Example
Queries Q1 and Q2 now run successfully. They gave a syntax error in previous versions of Exasol.
-- Setup
CREATE TABLE a (a1 INT, a2 INT);
INSERT INTO a VALUES (1, 2),
(3, 4);
-- Q1
SELECT ROW_NUMBER() OVER (ORDER BY a1),
*
FROM a;
-- Q2
SELECT *,
a1 + a2 AS sum,
a1 * a2 AS product
FROM a;