On Nov 22, 2007, at 1:45 AM, imgrey wrote:
> > Good Day sqlalchemy. > > I was searching, but didn't found a way to delete records from db not > executing selection first. > > So, how to represent this SQL statement in slqalchemy ORM : > """ DELETE FROM a WHERE b = c """ ? > just execute the SQL directly, using either the engine or the conneciton from the session: session.connection().execute("delete from a where b = c") or use a construct: session.connection.execute(table.delete(table.c.b==c)) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---