python调用存储过程
2023-09-27 14:20:53 时间
def call_sp_test(): delete_sql = "call sp_test()" # 打开数据库连接 db = pymysql.connect(host=insert_mysqlserver, user=insert_username, password=insert_password, port=3306,db=insert_dbname) # 使用 cursor() 方法创建一个游标对象 cursor cursor = db.cursor() try: cursor.execute(delete_sql) db.commit() except Exception as e: print(e) db.close()
相关文章
- python 向mysql中存储图片以及读取图片
- Python 批量处理图像尺寸
- 利用Python进行数据分析(原书第2版)
- 【点云NormalEstimation】python-pcl:法向量估计并存储
- 成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
- Pytorch 学习(9):Python C 扩展( C、C++代码-----C so 代码库------python代码调用)
- Python中判断字符串是否为数字的三个方法isdecimal 、isdigit、isnumeric的差别
- 第3.10节 Python强大的字符串格式化新功能:使用format字符串格式化
- Python 正则替换内容