Toad World® Forums

Joins - Traditional or Ansi


#1

When joining tables in oracle is it preferred to use the traditional approach:

select
a.field1, b.field2
from
table1 a, table2 b
where
a.id = b.id

or the Ansi standard approach:

select
a.field1, b.field2
from
table1 a
inner join
table2 b
on
a.id = b.id

I’m new to oracle but I’ve used sql server a decent amount. I prefer the Ansi Standard but I was wondering what the preferred method is for oracle databases.

Thanks


#2

For Oracle optimizer it does not really matter.

There are few specific things you can write more easily using the ANSI, for example an outer join query with a filter condition applied to the smaller table at the same time, but ultimately there’s no difference in the traditional vs ANSI query performance.