Trigger question (auto-increment)

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Oct 18 09:22:13 CDT 2007


On 18/10/07 4:51 PM, "Martin S." <blackfin at elfenherz.de> wrote:

>> New.AutoID = SELECT MAX(AutoID)+1 FROM Table1
>> 
> no, this does not work inside a trigger (unexpected token: SELECT)
> :(

 SET New.AutoID = SELECT MAX(AutoID)+1 FROM Table1


See 

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:vsql:reference:variables


Last section  "Assignment from SELECT"


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list