#mapping class
class Billing(Base):
__tablename__ = 'billing'
id = Column(Integer, primary_key=True)
billingdate= Column(DateTime, nullable=False)
amt = Column(Integer, nullable=False)
rate = Column(Integer, nullable=False)
fk_cpid = Column(Integer, ForeignKey('company.cpid'))
#run
query = self.mssql_session.query(Billing.billingdate).all()
结果
$83749283 => $83,749,283
如何在Billing.billingdate中仅在SQLAlchemy级别插入符号(,)
替换,子字符串
希望,这个代码能帮到你
相关问题 更多 >
编程相关推荐