On Nov 3, 2011, at 2:54 PM, Stefano Fontanelli wrote:
> Il 03/11/11 19.18, Mark Erbaugh ha scritto:
>> Using the query object count() method generates a sub-query (as per the
>> docs). The docs say to use func.count to avoid the subquery. func.count
>> seems to require a field object. Is there a way to generate a query that
>> essentially becomes 'select count(*) from table' using the ORM, not the SQL
>> generator?
>>
>> Thanks,
>> Mark
>>
> Did you try func.count('*')?
How would you specify the table you want counted? I trued
func.count('table.*') and that didn't work.
Mark
--
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.