Hello,
I am trying to perform a LEFT JOIN on a table which may or may not have
matching rows.
If there are no matching rows, it returns NULL's for all the missing fields.
Is there anyway of returning the default values for that table instead of
NULL's, in a portable way?
My query currently looks like this:
SELECT i_product.name, i_product.price , `i_tax-rate`.rate
FROM i_product
LEFT JOIN `i_tax-rate` ON (`i_tax-rate`.`tax-rate-id` =
i_product.`tax-band-id`)
WHERE i_product.id = 123';
Thanks for your thoughts!
Jamie.
I am trying to perform a LEFT JOIN on a table which may or may not have
matching rows.
If there are no matching rows, it returns NULL's for all the missing fields.
Is there anyway of returning the default values for that table instead of
NULL's, in a portable way?
My query currently looks like this:
SELECT i_product.name, i_product.price , `i_tax-rate`.rate
FROM i_product
LEFT JOIN `i_tax-rate` ON (`i_tax-rate`.`tax-rate-id` =
i_product.`tax-band-id`)
WHERE i_product.id = 123';
Thanks for your thoughts!
Jamie.
Comment