sqlite插入语句id自增列问题

sqlite给主键id设置AUTOINCREMENT自增在插入数据的时候报错table has x columns but x-1 values were supplied 为什么自增列要显示不提供,sqlite需要提供自增列table ResTools has 7 columns but 6 values were supplied

SQL Statement:insert into ResTools values('管理系统winform+Sqlite','项目\\C#程序设计\\C#winform项目\\管理系统','','Winform','0','0')

在管理工具中使用

insert into ResTools values(null,'管理系统winform+Sqlite','项目\\C#程序设计\\C#winform项目\\管理系统','','Winform','0','0')

如果在C#调用的话使用

string insertsql = string.Format("insert into diary values({0},'{1}','{2}','{3}')", "null", date, weather, text);

var inserttable = sqlhelper.ExecuteNonQuery(insertsql);

if (inserttable > 0)

{

var table = sqlhelper.GetDataTable(recentlysql);//查询

ViewBag.TableData = table;

}

else {

}

{0}不要加''

相关推荐
zfoo-framework42 分钟前
线上redis的使用
数据库·redis·缓存
典孝赢麻崩乐急1 小时前
Redis学习-----Redis的基本数据类型
数据库·redis·学习
止水编程 water_proof2 小时前
MySQL——事务详解
数据库·mysql
爱喝水的鱼丶2 小时前
SAP-ABAP:SAP ABAP OpenSQL JOIN 操作权威指南高效关联多表数据
运维·开发语言·数据库·sap·abap
m0_653031362 小时前
一套视频快速入门并精通PostgreSQL
数据库·postgresql
不似桂花酒2 小时前
数据库小知识
数据库·sql·mysql
ZZH1120KQ3 小时前
ORACLE的表维护
数据库·oracle
典孝赢麻崩乐急3 小时前
数据库学习------数据库事务的特性
数据库·学习·oracle
杜哥无敌3 小时前
在SQL SERVER 中,用SSMS 实现存储过程的每日自动调用
数据库
Warren983 小时前
MySQL查询语句详解
java·开发语言·数据库·mysql·算法·蓝桥杯·maven