The sqlalchemy update statement is documented here: http://www.sqlalchemy.org/docs/05/sqlexpression.html#sql_update
Basically, you want something like conn.execute(foo.update(values={foo.c.bar: 0 })) On Tue, Jul 22, 2008 at 10:49 AM, Heston James - Cold Beans <[EMAIL PROTECTED]> wrote: > Guys, > > > > I want to run a query which doesn't return any objects, just simply modifies > all records in the table, like so: > > > > UPDATE foo > > SET bar = 0 > > > > How can I do this using SQLAlchemy? Is it possible and 'proper' for me to > just pass this query as a string to be executed? Or is there a better > 'sqlalchemy' style of doing this? Should I be pulling all the records from > the db, modifying them and then resaving them? Seems like a heavy workload. > > > > Cheers, > > > > Heston > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---