Sqlite—插入语句(Insert)

SQLite 的 INSERT INTO 语句用于向数据库的某个表中添加新的数据行。

基本语法:INSERT INTO TABLE_NAME VALUES (value1,value2,value3,...valueN);

-- 插入时,所有字段都传值的时候
sqlite> insert into tb_user values(1, "张三", 26);

-- 插入时,不用每个字段都传值。id字段自增加1,其他字段没传值就为空值
sqlite> insert into tb_user(name) values("李四");          
sqlite> insert into tb_user(name, age) values("王五", 26);

https://www.jianshu.com/p/faa5e852b76b

https://bbs.csdn.net/topics/70039385

https://www.runoob.com/sqlite/sqlite-insert.html

http://c.biancheng.net/view/2577.html

http://30daydo.com/article/93

posted @ 2019-11-30 16:54  刘_love_田  阅读(5840)  评论(0编辑  收藏  举报