mysql命令备忘
连接数据库:mysql -u root -h 192.168.1.101 -p查看数据库版本:select version();
设置mysql的连接通道的字符集
mysql> SET character_set_client = x;
mysql> SET character_set_results = x;
mysql> SET character_set_connection = x;
连接
mysql concat
经纬度距离排序
select *,(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(111.86141967773438-lat)/360),2)+COS(PI()*33.07078170776367/180)* COS(lat * PI()/180)*POW(SIN(PI()*(33.07078170776367-lng)/360),2)))) as juli from area order by juli asc limit 0,20
页:
[1]