Column list is not supported in derived tables
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
SELECT * FROM (SELECT 1, 2, 3, 4) AS dt (a, b, c, d);
```
### 2. What did you expect to see? (Required)
On MySQL 8.1,
```sql
mysql> SELECT * FROM (SELECT 1, 2, 3, 4) AS dt (a, b, c, d);
+---+---+---+---+
| a | b | c | d |
+---+---+---+---+
| 1 | 2 | 3 | 4 |
+---+---+---+---+
1 row in set (0.01 sec)
```
### 3. What did you see instead (Required)
```sql
mysql> SELECT * FROM (SELECT 1, 2, 3, 4) AS dt (a, b, c, d);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 41 near "(a, b, c, d)"
```
### 4. What is your TiDB version? (Required)
ceb718124c87c7f99b726036e5896145fd01ce71
Contributor guide
Assessment
This issue has not been assessed yet.