[sqlalchemy] count function problem

2007-03-14 Thread Glauco
I've some problem in 'count' function over a simple select table. In [62]: print select([tbl['azienda'].c.id], tbl['azienda']) *SELECT azienda.id FROM azienda* This is perfect but when i try to use count function the SQL composer try to do an expensive sql. In [63]: print select([tbl['az

[sqlalchemy] count(*) function

2007-01-15 Thread milena
Hi, does anyone know the syntax of SELECT COUNT(*) FROM table_name; for SQLAlchemy? Is there a list of functions (used in SELECT statement) that exist in SQL that I can use in SQLAlchemy? btw, I am using MySQL. I need to see if my table is empty (isemty function doesn't work). Thanks! --~-