SQLite命令

表中数据搜索

select vname from list_paramterConfig where DllName=(?) and INorOut=1  
#vname :列名
#list_paramterConfig:表名
#Dllname和INorOut都是列名做为判断条件的

表中插入数据

  INSERT INTO [表名] VALUES(1,'Alice',25,'CHN');//这样插入代表插入整行数据,缺少数据报错不便使用。

  INSERT INTO [表名]([Age1],[Age2]) VALUES('Jhon',43);//表名后边跟括号括号中填入需要需要填写的列名,这样后边数值跟前边列名一一对应不会出错。

删除表中数据

  

                strSqliteCmd = ("delete from list_paramterConfig  where DllName=?")  # 二进制文件
                cu.execute(strSqliteCmd,(strStrategyName,))
                con.commit()  # 提交命令
原文地址:https://www.cnblogs.com/ScarecrowMark/p/11294669.html