Bug #4630 | MULTI-DELETE BUG when used WITH TABLE ALIASES | ||
---|---|---|---|
Submitted: | 19 Jul 2004 17:11 | Modified: | 19 Jul 2004 20:44 |
Reporter: | Egor Egorov | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.3 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[19 Jul 2004 17:11]
Egor Egorov
[19 Jul 2004 20:44]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: http://dev.mysql.com/doc/mysql/en/DELETE.html
[19 Aug 2008 20:15]
Jenny Nunemacher
I don't understand why this isn't a bug. I also get the same error when I use alias in a multi-table delete. The documentation on a delete statement indicates should be able to use aliases in the table_reference clause as well as in the join_table clause.
[19 Aug 2008 20:31]
Jenny Nunemacher
Nevermind my last comment. I was trying to use the actual table name in the DELETE FROM [tbl_name] instead of using the alias specified in the table references.
[20 Jun 2011 14:51]
Trent Lloyd
The trick is DELETE tbl_name FROM table_reference_1 alias1, table_reference 2 alias2; tbl_name must be the alias1 not table_reference_1.
[10 Feb 2013 3:46]
Milen Georgiev
Documentation is badly written IMHO - only after reading this ticket I figured out what was wrong with my query. Maybe someone can change it or just add a good and useful example.