please tell me the diff
select supplier.sup_id from supplier,product where supplier.sup_id=product.sup_id
order by supplier.sup_id
select supplier.sup_id from supplier,product where supplier join product
supplier.sup_id=product.sup_id
order by supplier.sup_id
What is the diffrence between these two sql qry?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 24, 2011, 5:39 AM EDT
The first query will inner join supplier and product and return sup_id from supplier table ordering the results by sup_id from supplier table.
The second query will give an error as I am not aware of any SQL syntax which has join keyword in the where clause.
Please do not forget to mark "Accepted Answer".
Andrew FensterRank #983 · 2K reputationPosted Oct 24, 2011, 12:51 PM EDT
select supplier.sup_id
from supplier join product
on supplier.sup_id=product.sup_id
order by supplier.sup_id
This should return the same data as the first query.