Home > Blockchain >  "join" is not valid at this position, expecting EOF ,";"
"join" is not valid at this position, expecting EOF ,";"

Time:10-09

DELETE FROM `order` join order_detail WHERE order_id = 1578;

Could anyone please help me. the word from have a red underline said "from" is not valid at this position, expecting: EOF, ";" but i google it and have not thing wrong with it mysql

CodePudding user response:

DELETE a, b FROM `order` a JOIN order_detail b ON ...your missing join conditions... WHERE a.order_id = 1578;

CodePudding user response:

In mysql it is necessary to provide the column on which the join is supposed to take place.

So your query should look like:

DELETE FROM `order` JOIN `order_details` ON <your-join-condition> WHERE order.order_id = 1578;
  • Related