Blogger Information
Blog 14
fans 0
comment 0
visits 27820
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
mysql查询
花式BUG_beisi
Original
548 people have browsed it

查询范围: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;

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post