查询范围:in not in 下面这个效率会高点
select * from shopnc_orders where add_time between 152300000 and 1523256071;
查询当前时间:
select now();
去除重复的数据:一般写在 select distinct 后面
distinct
排序:关键字后跟字段,就是指定这个字段
order by(分组) desc asc(默认 升序)
连表查询,具体查某个字段:b.order_id 字段后面还可以跟and 约束条件 如:b.order_id= 123456;
select a.reciver_name,b.goods_id from shopnc_order_common as a,shopnc_order_goods as b where a.order_id = b.order_id;