python - 使用Sqlalchemy查询SQL,无法返回最新数据
问题描述
我发现了一个问题:它没有查询回最新的“SamplingTime”。查询结果中最新的'SamplingTime'是“10-16”,在数据库中是“10-18”。如何解决?
sql_query = session.execute("select top 1 SamplingTime from SampleData order by SamplingTime desc")
record = sql_query.fetchall()
print(record)
解决方案
推荐阅读
- flutter - 如何从用户那里获取正确的家庭住址?
- dll - 如何解决错误 0xc0000139
- python-3.x - “gym.envs.box2d”的 COLAB 上的 RL 问题没有属性“LunarLander”
- javascript - VueJS 中的路由验证
- python - 如何在python 3中打印红心
- c - 从“struct node”类型分配给“struct node *”类型时的类型不兼容
- c# - 当我在 c# 的下拉列表中使用数据绑定时,如何解决 System.InvalidOperationException
- ros - 在凉亭中使用 IMU 传感器向上移动对象
- postgresql - 渡槽数据库升级无法连接到数据库
- python - 如何搜索二维数组并返回元素