I have three tables in the following form.
C 1 2 3 4 B 1 2 3 4 5 A B C 1 1 1 2 1 2 3 1 3 4 1 4 5 2 1 6 2 2 7 3 1 8 4 1 9 5 1
And want to show list with all “B” who do not have corresponding “C”. For example:
----------- |2|3,4 | |3|2,3,4,5| |4|2,3,4,5| |5|2,3,4,5| -----------
I do not have much experience with sql. I’ll be glad of any assistance or prompting.
Untested but I think something like the following should work.
Edit: Though bizarrely it appears as though MySQL has redefined
CROSS JOINto mean the same asINNER JOINso you might need to achieve theCROSS JOINby usingtableB b, tableC cinstead oftableB b CROSS JOIN tableC c