Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PharbAct
Starting Member
1 Post |
Posted - 2009-08-27 : 05:19:09
|
| hello evrybody i'm new to Sql and in this Forumi allready know how to work on join queries but can anyone tell me what is the diffrence between those 2 querys ?1 - Select CT.id,CT.PayMethod,p.* from CashierTransactionDetail CT,Paymethod p where CT.payMethod = p.id2 - Select CT.id,CT.PayMethod,p.* from CashierTransactionDetail CT inner join Paymethod p on CT.payMethod = p.idare those queries the same ,and in that case why do we have the inner join statment ?thank you |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
|
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2009-08-27 : 06:01:16
|
quote: Originally posted by PharbAct hello evrybody i'm new to Sql and in this Forumi allready know how to work on join queries but can anyone tell me what is the diffrence between those 2 querys ?1 - Select CT.id,CT.PayMethod,p.* from CashierTransactionDetail CT,Paymethod p where CT.payMethod = p.id2 - Select CT.id,CT.PayMethod,p.* from CashierTransactionDetail CT inner join Paymethod p on CT.payMethod = p.idare those queries the same ,and in that case why do we have the inner join statment ?thank you
look at the execution plan for both queries... |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-08-27 : 07:00:12
|
The difference is only the used syntax.#1 is the old, deprecated way.#2 is the better way to do this join. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|
|
|