As a side note, I thought that the was one of the nice things about SQL in
general, that there was no real strong ordering requirement with respect to
statements.  That was why T-SQL and some of the others introduced more
procedural constructs.

Is this wrong?

--Keith

+--------------------------------+ 
 [EMAIL PROTECTED] 
 Lead Speech Recognition Engineer 
 Toll-Free: (877) 977 - 0707 
 Phone:     (858) 707 - 0707 x238 

 www.LumenVox.com 
 Fax:       (858) 707 - 7072 

 LumenVox, LLC 
 3615 Kearny Villa Rd #202 
 San Diego, CA 92123 
+--------------------------------+ 
 

> -----Original Message-----
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 12, 2004 5:19 AM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [sqlite] execution order of Update
> 
> 
> Rubens Jr. wrote:
> > 
> > Is the update command executed in same order that was writen in the 
> > sql command ? example :
> > UPDATE t1 SET f1 = f2, f2 = 'xxxx' WHERE ....
> > Is garanted that with this command f1 will have the value 
> of f2 BEFORE f2
> > receive value xxx ?
> > I need to save the value of f2 than update f2, but
> > I'm not shure that this may be done with only one sql command ...
> > 
> 
> The right-hand side of every term is evaluated first, before
> any changes are made.  So you can say this:
> 
>     UPDATE t1 SET f1=f2, f2=f1;
> 
> And it will swap the values of F1 and F2.
> 
> 
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to