我正在编写一个脚本来从sqlazure数据库中删除行。当我在Jupyter笔记本中执行这个脚本时,它将永远运行,并且从不删除行。你知道为什么这个脚本没有执行吗?你知道吗
key = input("Enter key to remove\n")
cnxn = pyodbc.connect('DRIVER='+driver+';SERVER='+server+'; UID='+username+';PWD='+ password)
cursor = cnxn.cursor()
sql = "DELETE FROM Customer where CustomerID like '{key}%'"
process = sql.format(key = key)
cursor.execute(process)
cursor.commit()
目前没有回答
相关问题 更多 >
编程相关推荐