MySQL : Can't use FULL JOIN?

I asked a question about how to find data that doesn't match from a two different table before and after doing some research myself, I found that some people are using the FULL JOIN statement in their script. I tried using the FULL JOIN thing but it doesn't work. Maybe it's not supported in MySQL or because my version is outdated. So, I tried using LEFT JOIN UNION ALL with RIGHT JOIN. Not sure if that's the correct way though. The results? The SQLyog is still running since yesterday! So tell me if this is correct or not and does it make a neverending loop?

SELECT mas_newitem.itemcode,hq_itemtemp.longname,hq_itemtemp.productcode
FROM mas_newitem
LEFT JOIN hq_itemtemp
ON mas_newitem.longname=hq_itemtemp.longname
WHERE mas_newitem.itemcode <> hq_itemtemp.productcode
and hq_itemtemp.outletcode='005'
and hq_itemtemp.deptcode='05'
UNION ALL
SELECT mas_newitem.itemcode,hq_itemtemp.longname,hq_itemtemp.productcode
FROM mas_newitem
RIGHT JOIN hq_itemtemp
ON mas_newitem.longname=hq_itemtemp.longname
WHERE mas_newitem.itemcode <> hq_itemtemp.productcode
and hq_itemtemp.outletcode='005'
and hq_itemtemp.deptcode='05';

Sorry, I'm new in this so.......

nazirula2012-02-15T22:07:37Z

Favorite Answer

if you are about to use the FULL JOIN, your tables must have identical value...and only identical that will appear

but based on your problem, you want to select column that not same with other table right?

you may use VIEW or using the temporary tables

:)

Anonymous2016-12-13T21:33:31Z

incredibly disrespectful! An smart and honorable guy or woman would attempt to establish the common of the classification by utilizing watching or perhaps transforming into a member of for a month or 2. certainly one of two issues can ensue in the event that they settle to your grant: a million. You defeat the instructor. right here your ego is boosted and his livelihood is destroyed. His kin suffers and you stroll away. some hero you're. 2. He beats the stuffing out of you. You land up interior the wellness center with greater expenses than 2 months' rather worth of instructions. the two way is a lose - lose subject. we don't exist in fuedal situations anymore. we ought to continuously tutor some point of maturation and evolution. while you're incredibly drawn to getting to understand, sign in for a pair of months and journey the classification. like it? You stay. do no longer like it? you circulate away, end of tale. scuffling with in this style shows in simple terms an excellent loss of emotional adulthood.