Why to use a JOIN in SQL and when to use it? -


this question has answer here:

so if i've asked following question:

write sql statement find list of customers appointed salesman jobs gets commission company more 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 different between following ways it? if so, different? because end result same

if both same, why use ever inner join sentence? seams more difficult me first solution

select customer.cust_name, salesman.name, salesman.commission customer, salesman salesman.commission > 0.12 , customer.salesman_id = salesman.salesman_id 

-

select customer.cust_name, salesman.name, salesman.commission customer inner join      salesman      on customer.salesman_id = salesman.salesman_id salesman.commission > 0.12  

thank much

the "more difficult" solution 1 you're not used to. of world uses inner join these days, if want write code more universally readable other programmers, should use inner join