2016-1221

SQL SERVER:

SELECT
  CASE
    WHEN A.COLORDER=1
    THEN D.NAME
    ELSE ''
  END AS 表名,
  CASE
    WHEN A.COLORDER=1
    THEN ISNULL(F.VALUE,'')
    ELSE ''
  END        AS 表说明,
  A.COLORDER AS 字段序号,
  A.NAME     AS 字段名,
  CASE
    WHEN COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1
    THEN '√'
    ELSE ''
  END AS 标识,
  C 阅读全文>>
                
标签: SQLSERVER ORACLE 阅读:706
2013-1024

mysql计算GPS经纬度距离

DELIMITER $$
CREATEDEFINER=`root`@`localhost` FUNCTION`getDistance`(
lon1 float(10,7)
,lat1 float(10,7)
,lon2 float(10,7)
,lat2 float(10,7)
) RETURNSdouble
begin
declared double;
declareradius int;
setradius = 6378140; #假设地球为正球形,直径为6378140米
setd = (2*ATAN2(SQRT(SIN((lat1-lat2)*PI()/180/2)
*SIN((lat1-lat2)*P 阅读全文>>
                
标签: mysql php 经纬度坐标距离 sqlserver mssql oracle 阅读:4637