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
Loading
Andrew FensterPosted Oct 24, 2011, 4:51 PM
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.
Javeed M ShaikhPosted Oct 24, 2011, 9:39 AM
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".