SQL join question

Bob Sneidar bobsneidar at iotecdigital.com
Fri May 15 13:57:03 EDT 2015


Hi all. 

I am just now learning SQL joins, and I have run across an interesting caveat. It may be how sqlYoga is working or it may be how joins work. I have two tables, devices and accessories. This is a one to many relationship. I set up the join as a left join on devices.deviceid = accessories.deviceid. Not all devices have associated accessory records. 

The problem is, instead of getting a record with every device in inventory, whether or not it has accessories, I am *ONLY* getting devices with associated accessories. Is this the normal behavior of joins? If not, how would I structure the join so that I got blank accessory columns for devices without accessories? 



More information about the use-livecode mailing list