January 15, 2012 at 10:48 pm
Dear Friends,
I am having two tables TB_PERSON_P and TB_PERSON_R
both having a common column R_ID
now we can write two query:
select R_ID from TB_PERSON_P P,TB_PERSON_R R where P.R_ID=R.R_ID
and
Select R_ID from TB_PERSON_P P join TB_PERSON_R on P.R_ID=R.R_ID
which would be faster among these two statement?
Thanks!!
January 16, 2012 at 1:48 am
They will perform the same (same execution plan), the only difference is one uses the ANSI syntax and the other the old style SQL Server / Sybase syntax.
January 16, 2012 at 1:52 am
...and I would recommend specifying the join type for readability if using the improved ANSI joins:
INNER JOIN (default)
RIGHT OUTER JOIN
LEFT OUTER JOIN etc etc
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy