> > Hi, > > >I am using turbogears with sqlalchemy and assign_mapper. > >How do I select one column only when doing a select statement? > > > > > Can I ask why you want to do that? Unless you're really speed critical, > selecting them all isn't too bad. > > But, if you're set on this, there are two approaches: > 1) Abandon the ORM and do something like
> db.execute(select([Useraddress.Address_Sid], Useraddress.User_Sid == 30)) And if I wanted to select a year and group by year? "select User.Year from User group by User.Year" db.execute(select([User.Year]) ??? > 2) Use deferred column loading (see the docs, advanced data mapping). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---