mercredi 4 février 2015

SQLite query give different result from mysql

I have two table in my sqlite db here is the first table named supplierenter image description here and here is the second table named product enter image description here


what I want to do is I want to get the supplier_name in table product by selecting id_supplier in table_product. Here is my query SELECT table_supplier.id_supplier, table_supplier.supplier_name from table_invoice_in, table_supplier where table_invoice_in.id_product = '4' and table_supplier.id_supplier = table_invoice_in.id_supplier


and what I got from that query is I can get the id_supplier but supplier_name gives me 0 value, but when I try the query in mysql, I got the correct result. My question is :



  1. Is this a limitation of sqlite or there are something wrong with my query?


Thank you in advance.


Aucun commentaire:

Enregistrer un commentaire