Home » SQL & PL/SQL » SQL & PL/SQL » Regular SQL Syntax and ANSI Syntax
Regular SQL Syntax and ANSI Syntax [message #314461] Wed, 16 April 2008 15:41 Go to next message
bandarna
Messages: 2
Registered: March 2008
Location: Los Angeles
Junior Member
Hi,
Does any one have idea which one is best in case of performance and any other purposes? Both SQLs gives the same out put but one is regular and other one is ANSI syntax
Regular syntax:
SQL >SELECT Table_A.letter, Table_B.letter
2 FROM Table_A, Table_B
3 WHERE Table_A.letter = Table_B.letter;

LETTER LETTER
---------- ----------
A A


ANSI Syntax:

SQL >SELECT Table_A.letter, Table_B.letter
2 FROM Table_A INNER JOIN Table_B
3 ON Table_A.letter = Table_B.letter;

LETTER LETTER
---------- ----------
A A


Thanx
N.Bandaru
Re: Regular SQL Syntax and ANSI Syntax [message #314482 is a reply to message #314461] Wed, 16 April 2008 20:58 Go to previous messageGo to next message
BlackSwan
Messages: 25047
Registered: January 2009
Location: SoCal
Senior Member
post EXPLAIN_PLAN for both statements
Re: Regular SQL Syntax and ANSI Syntax [message #314488 is a reply to message #314482] Wed, 16 April 2008 21:42 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
It's all the same to Oracle. They are optimised by the same optimiser into the same underlying system operations.

One syntax does not have access to magical "go-fast" system capabilities.

That said, any two semantically identical statements with different syntax have the potential to evaluate to different plans. Not because one is inherently better, just because it happens.

Between you and your team/group/department, pick one and stick to it for all statements.

Ross Leishman
Re: Regular SQL Syntax and ANSI Syntax [message #315088 is a reply to message #314461] Fri, 18 April 2008 23:35 Go to previous message
bandarna
Messages: 2
Registered: March 2008
Location: Los Angeles
Junior Member
Thanks to all!
I recently took a new job. out of 11 Years I have seen first time here all oracle code was coded in ANSI. It's hard for me to understand.

I am sure whenever i get a chance I will change them.

Razz
Previous Topic: BULK COLLECT SLOWER THAN FOR CURSOR LOOP
Next Topic: Run shell script from PL/SQL
Goto Forum:
  


Current Time: Wed Dec 07 14:23:19 CST 2016

Total time taken to generate the page: 0.41314 seconds