Re: ERROR 1066: Not unique table/alias: 'A'
Sergei Golubchik <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Oct 15, Roger Larsson (RRLN) wrote: > Hello! > > Following insert works on Oracle 7,8,9 and MS SQLServer 6,7,2000 (without > 'TYPE=INNODB'). > Is it posible to get MySQL to understand this insert also? Yes! Actually, MySQL understands it now, in the 4.1 development tree. It was implemented after 4.1.0 release. So your query will work in 4.1.1. > Version used: > D:\mysql\bin>mysqld-max-nt.exe -V > mysqld-max-nt.exe Ver 4.1.0-alpha-max-nt for NT on i32 > > --- > mysql> DROP TABLE IF EXISTS A; > Query OK, 0 rows affected (0.00 sec) > > mysql> CREATE TABLE A (a1 INT) TYPE=INNODB; > Query OK, 0 rows affected (0.00 sec) > > mysql> INSERT INTO A (a1) VALUES (1); > Query OK, 1 row affected (0.00 sec) > > mysql> COMMIT; > Query OK, 0 rows affected (0.00 sec) > > mysql> SELECT * FROM A; > +------+ > | a1 | > +------+ > | 1 | > +------+ > 1 row in set (0.00 sec) > > mysql> INSERT INTO A (a1) SELECT max(a1)+1 FROM A; > ERROR 1066: Not unique table/alias: 'A' > --- > > Regards/ > Roger Larsson > Regards, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[email protected]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ www.mysql.com -- MySQL Bugs Mailing List For list archives: http://lists.mysql.com/bugs To unsubscribe: http://lists.mysql.com/[email protected]