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}不要加''

相关推荐
RestCloud4 小时前
SQL Server到Hive:批处理ETL性能提升30%的实战经验
数据库·api
RestCloud4 小时前
为什么说零代码 ETL 是未来趋势?
数据库·api
ClouGence6 小时前
CloudCanal + Paimon + SelectDB 从 0 到 1 构建实时湖仓
数据库
DemonAvenger13 小时前
NoSQL与MySQL混合架构设计:从入门到实战的最佳实践
数据库·mysql·性能优化
AAA修煤气灶刘哥1 天前
后端人速藏!数据库PD建模避坑指南
数据库·后端·mysql
RestCloud1 天前
揭秘 CDC 技术:让数据库同步快人一步
数据库·api
得物技术1 天前
MySQL单表为何别超2000万行?揭秘B+树与16KB页的生死博弈|得物技术
数据库·后端·mysql
可涵不会debug1 天前
【IoTDB】时序数据库选型指南:工业大数据场景下的技术突围
数据库·时序数据库
ByteBlossom1 天前
MySQL 面试场景题之如何处理 BLOB 和CLOB 数据类型?
数据库·mysql·面试
麦兜*2 天前
MongoDB Atlas 云数据库实战:从零搭建全球多节点集群
java·数据库·spring boot·mongodb·spring·spring cloud