Petr B. wrote:
>
> Hi all,
>
> I have been searching in vain on how to make something like this:
>
>      UPDATE table SET value=value+10
>
> in the expression language (not ORM). Can somebody help me please?
> (what I do now is I obtain a connection and call a raw sql, but that
> is
> rather ugly isn't it?)

you may use:

table.update().values(value=table.c.value + 10)

a similar example (though using an uglier dictionary syntax I should
update) is illustrated at:

http://www.sqlalchemy.org/docs/05/sqlexpression.html#updates






>
> Thanks,
> Petr
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to