2
Answers

SQL Query Problem

Smart    Lucky

Smart Lucky

10y
600
1
Hi dudes
 
 I have query issues i have company table and a coupon table  and relation is one to many means company can has many coupons i want just show in query company name with coupon name just one coupon of each company i did query in this way it is showing duplicate data...
 
 
SELECT comp.name,c.name FROM company comp LEFT OUTER JOIN coupon c ON c.companyid= comp.id
GROUP BY comp.name,c.name 
Answers (2)