Hi All Just my 2c;
The original question was "why is SA doing the select before it does the delete? and then the comment was added that he would have done a simple count instead.." It appears that he was not aware that the DELETE could return the count as well (indirectly) so in actual fact, NEITHER the "SELECT count" OR the SELECT that SA inserts in front of the DELETE appear to be required. So, back to the thread of the question - "Why is SA doing the query that it does BEFORE it does the DELETE?" It's purpose is not obvious. Hope that helps!? :-) On 5 October 2010 18:48, Chris Withers <[email protected]> wrote: > On 04/10/2010 13:16, Mark Erbaugh wrote: > >> If I were doing this in SQL, I would to the first command as >> >> SELECT count(*) >> FROM period >> WHERE period.cycle = ? >> > > Why would you do this first? > > Chris > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<sqlalchemy%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
