## imports
import pandas as pd
import pprint
## Querying a systems table
cursor.execute('SELECT * FROM "PUBLIC"."M_CS_TABLES" LIMIT 10')
pd.DataFrame(cursor.fetchall())
## Creating a table:
cursor.execute('CREATE TABLE PYHDB_TEST("NAMES" VARCHAR (255) null)')
## Inserting a row to the table:
cursor.execute("INSERT INTO PYHDB_TEST VALUES('Testing python
client')")
pprint.pprint(cursor.rowcount)
引用:https://github.com/SAP/PyHDB
其他一些要尝试的查询
安装API pyhdb。
该链接包含有关如何安装pyhdb和如何使用pyhdb的说明。塞尔斯。
请注意,示例假设
auto-commit = true
要安装的命令:
示例(auto commit=true):
相关问题 更多 >
编程相关推荐