python,这堆报错是什么意思?

Traceback (most recent call last):

  File "src\pymssql\_pymssql.pyx", line 459, in pymssql._pymssql.Cursor.execute

  File "src\pymssql\_mssql.pyx", line 1087, in pymssql._mssql.MSSQLConnection.execute_query

  File "src\pymssql\_mssql.pyx", line 1118, in pymssql._mssql.MSSQLConnection.execute_query

  File "src\pymssql\_mssql.pyx", line 1251, in pymssql._mssql.MSSQLConnection.format_and_run_query

  File "src\pymssql\_mssql.pyx", line 1789, in pymssql._mssql.check_cancel_and_raise

  File "src\pymssql\_mssql.pyx", line 1835, in pymssql._mssql.raise_MSSQLDatabaseException

pymssql._mssql.MSSQLDatabaseException: (110, b'There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.DB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\n')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "C:\Users\Administrator\PycharmProjects\pythonProject4\dd.py", line 33, in <module>

    cursor.execute(sql)

  File "src\pymssql\_pymssql.pyx", line 479, in pymssql._pymssql.Cursor.execute

pymssql._pymssql.OperationalError: (110, b'There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.DB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\n')

JavaScript 万里疆域一片叶 发布于 2022-11-29 10:38
1min目标场景问卷 立即参与
回答问题
悬赏:0 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
weibwLv7高级互助
发布于2022-11-29 10:44

你insert的值的列数超过了你预设的column的数。检查一下两边的字段数量是不是不匹配,一般是后面比前面多的

  • 1关注人数
  • 658浏览人数
  • 最后回答于:2022-11-29 10:44
    请选择关闭问题的原因
    确定 取消
    返回顶部