Tuesday 15 January 2013

Query in MySQL between 2 tables -


I am trying to get some results from 2 tables in mysql.

There is a code table for mysql

I can get some results if I have created a query in this link

Is there a better way to get the same result? <

I have tried this query and wanted the result that I have found, from which it is not productive (productive selection from cms_group_products), but I just want to know that Is the query correct.

I think the query is OK, but I will use an anti-job.

  SELECT cp.ProductID, PRODUCTTitle FROM cms_products cp LEFT JOIN cms_group_products cgp ON (cp.ProductID = cgp.ProductID and GID = 1000) WHERE cgp.ProductID IS NULL  < / Pre>  

No comments:

Post a Comment