我的 SQLAlchemy 代码:
used_emails = list(db.execute(halo4.select(halo4.c.email != '')))
返回:
[(80940L, 'P7J4H-DFDMG-G6HMJ-W7PF9-MDTF1', '1', 'first.last@domain.com', datetime.datetime(2012, 11, 3, 3, 48, 58)), (80939L, 'GCTFY-QPK2Y-PX1CJ-W69QY-PHDGZ', '1', 'first.last@domain.com', datetime.datetime(2012, 11, 3, 15, 8, 15)), (80938L, 'R4XGV-PG461-RGXX7-9R47R-2RWYZ', '1', 'first.last@domain.com', datetime.datetime(2012, 11, 3, 15, 8, 27))]
如何让 SQLAlchemy 只返回:
[('first.last@domain.com', 'first.last@domain.com', 'first.last@domain.com')]