当前位置 : 主页 > 编程语言 > python >

Python 中Mysql创建表时判断是否已经存在

来源:互联网 收集:自由互联 发布时间:2022-07-13
sql = ''' create table if not exists tableName(xxx); ''' cursor . execute ( sql ) db . commit ()


sql = '''
create table if not exists tableName(xxx);
'''
cursor.execute(sql)
db.commit()


网友评论