What does the MySQL USING statement do and is there any docs on this?
MySQL USING statement example
DELETE FROM l, s
USING l
INNER JOIN s ON s.skill_id = l.id
WHERE s.user_id = 3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In a DELETE, you can list tables after the USING clause, from which rows do not get deleted (i.e., to only be part of the WHERE clause). For example:
Your particular example can be achieved without USING in this fashion: