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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-03-02 : 07:58:42
|
Joiada writes "SQL Select Statement Using Multiple Tables in Oracle" |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2003-03-02 : 17:05:03
|
Idenitcal to select using multiple tables in T-SQL.select a.*, b.*from a,bwhere a.id = b.idetc....--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-03-27 : 18:13:02
|
quote: Idenitcal to select using multiple tables in T-SQL.select a.*, b.*from a,bwhere a.id = b.idetc....
Isn't that the T-SQL syntax only? Should Joiada be using the JOIN syntax so that the code can port to other systems that use SQL 92?TaraEdited by - tduggan on 03/27/2003 18:13:40 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-03-27 : 21:45:15
|
No, that's standard WHERE clause inner join syntax. The *= and =* is T-SQL specific and is considered obsolete. Oracle did not support the ANSI LEFT/RIGHT/INNER JOIN syntax until version 9 (!) and I'm sure a bunch of Oracle diehards are upset that it does now. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-03-28 : 12:25:30
|
quote: No, that's standard WHERE clause inner join syntax. The *= and =* is T-SQL specific and is considered obsolete. Oracle did not support the ANSI LEFT/RIGHT/INNER JOIN syntax until version 9 (!) and I'm sure a bunch of Oracle diehards are upset that it does now.
Thanks for the clarification, robvolk! I wasn't sure anyway, so that's why I asked.Tara |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-03-28 : 12:47:53
|
Just curious -- I know nothing about Oracle.If *= and *= are T-SQL, and Oracle just now supported the ANSI join syntax, what was the old Oracle syntax for outer joins??- Jeff |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-03-29 : 08:24:54
|
Something like this:SELECT * FROM A, B WHERE A.ID(+)=B.IDAnd for the life of me, I can't remember if that's a left or right join. All I know is that it was completely counterintuitive, and you could simply change the order of A and B in the FROM clause and/or in the WHERE clause and you'd get TOTALLY different results and not always realize it. And up until Oracle 8 (they say 7 would optimize, I don't believe it) this syntax wouldn't optimize in any way...it would run exactly as you ordered it, like using the FORCE ORDER clause in T-SQL. So changing the order of tables in the FROM clause can change results AND execution. And remember, Oracle is "better" than SQL Server. |
|
|
|
|
|
|
|