question

gautam87706 avatar image
gautam87706 asked

Why below SQL query is showing a syntax error in MySQL?

SELECT IFNULL(customer.cust_name, 'N/A') as customer_name

, IFNULL(product.prod_name, 'N/A') as product_name

, IFNULL(invoice_item.quantity, 0) as quantity

FROM ((customer

LEFT OUTER JOIN invoice ON customer.id = invoice.cust_id)

LEFT OUTER JOIN invoice_item ON invoice_item.invoice_id = invoice.id)

LEFT OUTER JOIN product ON invoice_item.product_id = product.id

ORDER BY customer.id, product.id;

mysql
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It'd be helpful if you posted the error it's throwing.

0 Likes 0 ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.