Home > Enterprise >  What is the difference between adding the table with join or adding directly after "from"
What is the difference between adding the table with join or adding directly after "from"

Time:11-22

I am new in sql so i just dont know the difference between them. Does it affect compile time or something else? Can you explain it?

select a.name, b.salary from account a, bank b
where a.id = b.id;

or

select a.name, b.salary from account a
join bank b on a.id = b.id;

CodePudding user response:

There is no difference. The latter is a newer (SQL-92) syntax and easier to read.

  •  Tags:  
  • sql
  • Related