I can’t understand why sql gave me an error #1064. I just followed the instruction at this
Full Outer Join – Save Output in new table
I tried putting “INSERT” syntax before the “INTO” but the error is the same
SELECT *
INTO newtable
FROM buyers FULL JOIN product
ON product.product_id = buyers.product_id
I expect it to run ok, but mysql gave me this error:
“#1064 – 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 ‘INTO newtable FROM buyers FULL JOIN product ON
product.product_id = buyers.pr’ at line 1”
2
Answers
for mysql (phpmyadmin) you need create select (and not select INTO as use in Sqlite)
but looking to your ON clause instead of a FULL JOIN seems you need INNER or LEFT JOIN
or
create table newtable
SELECT *
FROM buyers LEFT JOIN product
ON product.product_id = buyers.product_id
depending of exact match or not
or for a cartesain product you should use FULL JOIN this way
Try This One
IS THIS DO YOU WANT?