连接数据库出错了,执行sql语句的问题吗

    import mysql.connector
    db2 = mysql.connector.connect(
        host = "localhost",
        user = "root",
        passwd = "123456",
        database = "swd"
        )
    cursor2 = db2.cursor()
    x = ("call add1;")
    cursor2.execute(x)
# 关闭游标
    cursor2.close()
# 提交
    db2.commit()
    print("添加成功")
    db2.close()
    select()

这是我程序中的代码
下面是我写的存储过程

img


我想完成的操作是,比如从A表联结B表,然后插入到c表。现在出问题了,请打扰帮下忙。

不知道除了什么问题,但是你查询代码写的不对,也没看到你的存储过程,建议你再看呀mysql模块的api操作