sqlite 使用

1 SELECT * FROM menu WHERE dish_time < ‘datetime(“now”, “localtime”, “start of day”)’ AND finish_state = 2

SELECT * FROM menu WHERE ‘dish_time’ < ‘datetime(“now”, “localtime”, “start of day”)’ AND finish_state = 2

像上方是两种完全不同的结果,想表达式达到预期的效果。则字段与值一样的写法。单引号要有都有,没有单引号就都不要写单引号

2 sqlite多种排序方式,直接是不同字段逗号隔开。如:select * from menu order by dish_time,menu_name desc

    原文作者:羽霁
    原文地址: https://www.jianshu.com/p/d67d17c4d072
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞