So If I've asked the following question:
Write a SQL statement to find the list of customers who appointed a salesman for their jobs who gets a commission from the company is more than 12%
Tables: customer
customer_id cust_name city grade salesman_id
----------- ------------ ---------- ---------- -----------
3002 Nick Rimando New York 100 5001
3005 Graham Zusi California 200 5002
3001 Brad Guzan London 100 5005
3004 Fabian Johns Paris 300 5006
3007 Brad Davis New York 200 5001
3009 Geoff Camero Berlin 100 5003
3008 Julian Green London 300 5002
3003 Jozy Altidor Moncow 200 5007
salesman
salesman_id name city commission
----------- ---------- ---------- ----------
5001 James Hoog New York 0.15
5002 Nail Knite Paris 0.13
5005 Pit Alex London 0.11
5006 Mc Lyon Paris 0.14
5003 Lauson Hen San Jose 0.12
5007 Paul Adam Rome 0.13
Is there any different between the following ways to do it? If so, What is the different? Because the end result is the same
If both are the same, why to use ever a INNER JOIN sentence? it seams more difficult to me that the first solution
select customer.cust_name, salesman.name, salesman.commission
from customer, salesman
where salesman.commission > 0.12 and customer.salesman_id = salesman.salesman_id
-
select customer.cust_name, salesman.name, salesman.commission
from customer INNER JOIN
salesman
ON customer.salesman_id = salesman.salesman_id
where salesman.commission > 0.12
Thank you so much