Bug #3880 Enhance SELECT * syntax to leave out some columns
| Submitted: | 25 May 2004 8:16 | Modified: | 25 May 2004 15:49 |
|---|---|---|---|
| Reporter: | Mr. Venom | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server | Severity: | S4 (Feature request) |
| Version: | OS: | Any (any) | |
| Assigned to: | CPU Architecture: | Any |
[25 May 2004 8:16]
Mr. Venom
[25 May 2004 14:00]
Mr. Venom
And one more: why does SELECT *,NULL work, but SELECT NULL,* does not? That is, I wanted to port data from a table to an other. The latter one already has a primary key as the first column. So, doing "INSERT INTO latter SELECT NULL,* FROM first" seems quite logical. Ok, I guess, selecting NULL as first column (btw: SELECT NULL as `something`,* doesn't work either) is quite bogus, but keeping the primary key as the last column is neither a fine solution.
[25 May 2004 15:49]
Sergei Golubchik
first: SELECT * EXCEPT `uID`,`stamp` FROM import is non-standard so, though it could be possibly implemented, it's very low in the our todo list. second: neither SELECT *,NULL nor SELECT NULL,* is standard. It just happen that MySQL parser is forgiving in this regard and allows SELECT *,NULL. Having SELECT *,NULL and not having SELECT NULL,* is inconsistent, I agree. It will be fixed eventually, but it's also low-priority issue
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.