in ('1999-01-01','1999-01-02') and name = '张三'
3.范围主键查询限制
cassandra中范围查询只能放在条件查询的最后一个位置,例如,如果范围查询age...,则就不能添加phone查询条件
也就是这么写法是错的
select * from employee where bornDate = '2019-01-01' and name ='张三' and...age >18 and phone = '123456'
当然也并不是不能这么做,不过那样必须加上ALLOW FILTERING,但并不建议这么做
也就是下面这种写法是没问题的
select * from...employee where bornDate = '2019-01-01' and name ='张三' and age >18 and phone = '123456' allow filtering...;
4.排序规则
cassandra在创建表时设置一个排序规则,默认以此进行规则排序,如当前表,默认以正序age,正序bornDate和倒序createDate, 手动设置倒序只有一种方式,即将所有排序字段全部颠倒