-2

How does the following compare to a join statement?

 SELECT t1.name, t2.salary 
   FROM employee t1, info t2
  WHERE t1.name = t2.name;

would it be the equivalent to this?

   SELECT t1.name, t2.salary 
   FROM employee t1, 
   INNER JOIN info t2
   ON t1.name = t2.name;

or is it more like an outer join?

andrew
  • 9,313
  • 7
  • 30
  • 61

1 Answers1

1

it will be like this without comma.

   SELECT t1.name, t2.salary 
   FROM employee t1 
   INNER JOIN info t2
   ON t1.name = t2.name;

To use INNER JOIN or LEFT or RIGHT or ... its up to you what results you want get.

related values or values which exist in other table and so on , here you can learn about the joins.

enter image description here

SOURCE

echo_Me
  • 37,078
  • 5
  • 58
  • 78