Optimal SQL Query

Hallo Experts,

i am getting the same result with the following two sql s


select a.PONo, a.AMCBy, b.CurrentStickerNo
from AMCEntry a, StickerDetails b where a.StickerNo=b.ActStickerNo
order by a.PONo desc


select AMCEntry.PONo, AMCEntry.AMCBy, StickerDetails.CurrentStickerNo
from AMCEntry
inner join StickerDetails
on AMCEntry.StickerNo=StickerDetails.ActStickerNo
order by AMCEntry.PONo desc

my question is, which one is suggested to use and why?

Thanking you,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


these two queries are exactly the same. The last one formally closer to the standard. But really you can use any of them
Paul JacksonSoftware EngineerCommented:
as OMC2000 says they are functionally the same and looking at the execution plan for each query would show no difference, however I think the second statement is more adherent to what would be expected by most people trying to standardise there SQL code and make it more readable

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aneesh RetnakaranDatabase AdministratorCommented:
Although they are the same, you must follow the rules, must specify the exact type of join (so go with the second one)
Soumen-RoyAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.