DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... why syntax error? DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... why syntax error? sql sql

DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... why syntax error?


What @Matus and @CeesTimmerman said about MSSQL, works in MySQL 5.1.73 too:

delete <alias> from <table> <alias> where <alias>.<field>...


You can use SQL like this:

DELETE FROM ContactHostCommand USING `contact_hostcommands_relation` AS ContactHostCommand WHERE (ContactHostCommand.`chr_id` = 999999) LIMIT 1


You cannot use AS in a DELETE clause with MySQL :

DELETE FROM `contact_hostcommands_relation` WHERE (`chr_id` = 999999) LIMIT 1