Matt Fagan wrote:
Hello,

I'm trying to run an SQL update statement like:

UPDATE ControlTable SET @prevval := NextID, NextID = NextID
+ 1

I've tried using a range of different syntax, but nothing
seems to work. This is something that does work in another
SQL server I used to use.

Does anybody know if this is something MySQL can do, and if
so, what is the correct syntax? Note that I can't use an
autoincrement column because the IDs aren't being put into
a database.

I've searched through MySQL docs and mailing lists but
couldn't find any mention of this. Any help would be
appreciated.

A UDF or your own static function might work. Worst case, MySQL source can be modified to make this work.



-- Sasha Pachev Create online surveys at http://www.surveyz.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to