2024-10-02 08:19:13 发布
网友
在我的Python脚本中,我在建立连接后使用Sqlalchemy
connection = engine.connect() data_gov=connection.execute("select * into temp from mytest_1 where FollowersOf ='gov'") data=data_gov.fetchall()
但是我在我的sql数据库中看不到任何表,也无法获取所有表。请帮助
经过多次尝试,不知何故我自己得到了答案。下面的engine.connect()只是创建了一个代理连接。所以经过几次调整之后
connection = engine.raw_connection() data_gov=connection.execute("select * into temp from mytest_1 where FollowersOf ='gov'").commit() connection.close()
而且,您将很高兴在sql数据库中看到一个真正的表,而不仅仅是一个代理
经过多次尝试,不知何故我自己得到了答案。下面的engine.connect()只是创建了一个代理连接。所以经过几次调整之后
而且,您将很高兴在sql数据库中看到一个真正的表,而不仅仅是一个代理
相关问题 更多 >
编程相关推荐