
2.如果修改这个字段是主旋律,加索引会对更新 *** 作带来性能损失
3. 如果一定要用status这个字段进行查询,考虑下能否将status这个字段的值分离得更加离散,从索引的原来来说,索引离散才能快速定位到自己查询的数据
数据库中定义个int型字段比如col
abc与或之后的结果 赋值给col即可。
读取的时候直接读取。
&&可以用作逻辑与的运算符,表示逻辑与(and),当运算符两边的表达式的结果都为true时,整个运算结果才为true,否则,只要有一方为false,则结果为false。
比如:
int a1 =1,b2=2,c3=3
System.out.println((a1==b2)&&(b2==c3))
结果即为:false
(select * from 表名 where status='process' order by date_created desc)union all
(select * from 表名 where status='done' order by date_created asc)
union all
(select * from 表名 where status='failure' order by date_created asc)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)