Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #330
| From | "Lee Fesperman" <lee.fesperman@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Joining(?) question |
| Message-ID | <72ed2328-62ae-491f-be9f-b6faad045e13@q26g2000prq.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.databases |
| References | <geiv3f$c9g$1@aioe.org> |
| Date | 2011-04-27 15:23 +0000 |
| Organization | TDS.net |
To: comp.lang.java.databases On Nov 1, 5:17 pm, Lew <no...@lewscanon.com> wrote: > Lee Fesperman wrote: > > On Oct 30, 5:27 am, Lew <no...@lewscanon.com> wrote: > >> mdR wrote: > >>> SELECT BM.PARENT, BM.ITEM, IM.DESC > >>> FROM BM > >>> JOIN IM ON IM.ITEM = BM.ITEM > >>> WHERE BM.PARENT = 1; > >> Different RDBMSes vary wrt JOIN syntax. But RGB's version should have worked, > >> too. > > >> Some allow > > >> SELECT BM.PARENT, BM.ITEM, IM.DESC > >> FROM BM JOIN IM > >> WHERE BM.PARENT = 1; > > >> if there's a FK on the ITEM column to the other table. > > > I realize that DBMS support of Standard SQL is weak, but which ones > > support those semantics? According to SQL92, an unqualified JOIN > > (without NATURAL, ON or USING) is the same as CROSS JOIN (that is, a > > Cartesian Product.) > > Oops, left out the word "NATURAL", as in "NATURAL JOIN". That certainly makes a difference and will give the right results (given the table structure shown by the OP.) NATURAL joins on common column names between the two tables. FK joining is non-standard and begs the question: Which FK for which table is used? -- Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com) ============================================================== * The Ultimate DBMS is here! * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com) --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Find similar
Re: Joining(?) question "mdR" <mdr@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: Joining(?) question "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: Joining(?) question "Lee Fesperman" <lee.fesperman@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: Joining(?) question "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: Joining(?) question "Lee Fesperman" <lee.fesperman@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
csiph-web