首页
Java
登录
6mi
u
盘
搜
搜 索
Java
postgresql创建表名和schema都是参数
postgresql创建表名和schema都是参数
xiaoxiao
2021-02-28
77
前提是已经创建连接了
from psycopg2.extensions import AsIs cur = conn.cursor() schame=
'schemaname'
table
=
'tablename'
cur.execute(
"create table %s.%s(name text)"
,(AsIs(schema),AsIs(
table
))); conn.commit()
转载请注明原文地址: https://www.6miu.com/read-43854.html
技术
最新回复
(
0
)