因为sqlite为弱引用,使用字段前将他强制转为日期型,用datetime.或者最原始的 strftime. SELECT distinct ID from testTable where datetime(availDate) between datetime('2015-01-12 04:00') and datetime('2015-01-13 00:00'); SQLite日期时间函数 SQLite支持以下五个日期时间函数: date(timestring, modifier, modi
sqlite 一个短字符要去db里模糊查找时,可以用like 如select * from t_contact where uphone like '%1234%'; 但是当输入的字符串超过数据库里的长度时,模糊like就不起作用了,这时,要么从输入时就限制来做模糊查询,但有时这个模式无法变更,就得换搜索方式.一开始常识用instr函数来测试,mac机器测试通过,真机报instr函数不存在instr('0101234',uphone) iphone上不可用 另寻他路,用substr做匹配吧.ok
1. 字符函数 --upper(str), lower(str):将str转换成大,小写 select upper('hello') as x1, lower('HELlo') as x2 from dual; --initcap(str):将str中的每个单词的首字母大写,其他字母小写 select initcap('hELlo world!') as x from dual; --concat(str1, str2)或(str1 || str2):将str1和str2两个字符串连接成一个字符