select id,strCN,strEN from String2 where strCN == ''
从表String2中查找三列数据:id、strCN、strEN其中条件是strCN这一列为空。
查找语句还可以嵌套使用例如:
select id,strCN,strEN from String2 where strCN != '' and id not in (select id from String2 where strEN != '')
从表String2中查找三列数据:id、strCN、strEN。其中,条件是strCN不为空,并且id不在strEN为空的范围内。概括起来就讲,这个条件就是strCN不为空,strEN为空。
模糊查找语句
select id,strCN,strEN from String2 where strCN like '%\n%'
从表String2中查找三列数据:id、strCN、strEN。其中,条件是词条中包含有’\n’。
delete from String2 where id == 100
从表String2中删除id为100的项。
insert into String2 (id,strEN) values ('1044055','camshaft position actuator circuit')
向String2中添加一条,该条数据是:id是1044055,strEN为camshaft position actuator circuit。
update String set strFR = '' where id = 1080692
更新表String中的strFR列。其中,条件是id等于1080692。
pragma table_info([StringAttrib_Brand])
列出表StringAttrib_Brand的信息
alter table StringAttrib_Brand add column strD
在表StringAttrib_Brand中新增一列名字为strD
Select max(id) from String
说明:从表String中获得主键id的最大值
备注:屏蔽一个语句用”–”
update String set strDU=strNE where id = 100
说明:将String表中id=100的strEN列数据复制到strDU列中去
Original: https://blog.csdn.net/chengbaojin/article/details/124543503
Author: 黑刀夜
Title: sqlite语句
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/816738/
转载文章受原作者版权保护。转载请注明原作者出处!