![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
xuan_lin
这个作者很懒,什么都没留下…
展开
-
SQL语句实现根据经纬度计算距离并排序分页
SELECT *,(round(6367000 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - ({$userLatitude} * pi()) / 180) / 2), 2) + cos(({$userLatitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((long原创 2015-06-25 11:13:31 · 9677 阅读 · 0 评论 -
SQL查询实现区分大小写
在数据库查询中,默认是不区分大小写的。那如何让查询结果区分大小写呢? 在MySQL中的方法: 1)select * from user where name like "A\%B%" collate utf8_bin;或者select * from user where name collate utf8_bin like "A\%B%" ;collate utf8_bin放在like前后都可转载 2015-06-10 11:34:10 · 973 阅读 · 0 评论