EXISTS as an R:BASE operator equivalent to IS NOT NULL goes back to the time before R:BASE was compliant with ANSI standard SQL. EXISTS has a totally different use as an operator in SQL, and is also implemented in current R:BASE.
The SQL version of "EXISTS" is used with a subquery. SELECT * FROM tablename t1 WHERE EXISTS (select * from othertable t2 where t2.somecolumn = t1.someothercolumn) Bill On Wed, May 14, 2014 at 2:22 PM, Bill Eyring <[email protected]>wrote: > Karen, > > > > Thanks hadn't noticed that. > > > > Bill > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Karen > Tellef > *Sent:* Wednesday, May 14, 2014 1:35 PM > *To:* RBASE-L Mailing List > *Subject:* [RBASE-L] - Re: EXISTS vs. IS NOT NULL > > > > The only thing I know is that "EXISTS" is on the help screen as being an > Obsolete command. I never use obsolete commands because I can't be sure > that some day a version isn't going to come out that doesn't support the > command. > > > Karen > > > > > > -----Original Message----- > From: Bill Eyring <[email protected]> > To: RBASE-L Mailing List <[email protected]> > Sent: Wed, May 14, 2014 12:27 pm > Subject: [RBASE-L] - EXISTS vs. IS NOT NULL > > I would like to know whether EXISTS performs better or is preferential > when coding SQL rather than using IS NOT NULL. I would also like to know > what your particular preference is and why. > > > > I have used the IS NOT NULL parameter for years. Recently I have tried > using EXISTS which in certain instances seems to increase code performance. > > > > According to Rbase Extreme 9.5 documentation, the EXISTS parameter is only > mentioned(as far as I've seen) when used in a sub-select. Can EXISTS be > used outside a sub-select or not. > > > > For Example I could write this; > > > > insert into tablename1(column1, column2) sel colname3,colname4 from table2 > whe colname5 IS NOT NULL > > > > Alternatively I could write; > > > > insert into tablename1(column1, column2) sel colname3,colname4 from table2 > whe colname5 EXISTS > > > > Both work, although I get the feeling that EXISTS works faster. > > > > Any input would be appreciated. > > > > Bill Eyring > > > > >

