home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!shearson.com!newshost!wfinnert
- From: wfinnert@larry.shearson.com (Warren Finnerty)
- Subject: Re: Sequencer or Serial
- In-Reply-To: pburry@manitou.cse.dnd.ca's message of Tue, 15 Sep 92 02:55:50 GMT
- Message-ID: <WFINNERT.92Sep15121450@larry.shearson.com>
- Sender: news@shearson.com (News)
- Organization: Lehman Brothers
- References: <14821@gazette.bcm.tmc.edu> <howard.716504676@judy.cs.iastate.edu>
- <06ynl+l.mcentral@netcom.com>
- <1992Sep15.025550.27360@manitou.cse.dnd.ca>
- Date: Tue, 15 Sep 1992 17:14:50 GMT
- Lines: 24
-
- >In article <1992Sep15.025550.27360@manitou.cse.dnd.ca> pburry@manitou.cse.dnd.ca (Paul Burry) writes:
- >
- > In article <06ynl+l.mcentral@netcom.com> mcentral@netcom.com (Media Central) writes:
- > . . .
- > |begin tran
- > | update sequenc set col = col + 1 /* update first and then read */
- > | select @latest = col from sequenc where 1 = 1
- > |end tran
- > . . .
- >
- > Why the 'where 1 = 1' ? Is this some obscure optimizer work-around?
-
- Not needed I assure you.
- However you might choose to use:
-
- select @latest = max(col) from sequenc
-
- That syntax makes it obv. what you are getting back.
- Personal pref. I guess.
- --
- warren finnerty | 388 Greenwich St.
- Lehman Brothers | NYC NY 10013
- "Back off man!" | wfinnert@shearson.com
-
-