question
A number table is post_id
B number table bit is url
An and B have a lot of data
An and B some post_id matches url, and some are inconsistent (the fields related to An and B are post_id and url)
how do I eliminate all those that do not match? Leave only relevant
DELETE a, b FROM
`a`
JOIN `b` ON b.ID != a.post_id
....
mariaDB report error:
-sharp1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near "JOIN b ON b.ID != a.post_id" at line 3
and then say
Is this paragrapha, b an unexpected symbol?
PS:
- I want to delete two data tables as long as there are any non-conformities.
- I"m sure there are a lot of SELECT data that don"t match, and there are also matching data.
- a has multiple post_id, for example, if b.ID equals 123then a.post_id has one or more 123s