PostgreSQL WITH 临时表

前端之家收集整理的这篇文章主要介绍了PostgreSQL WITH 临时表前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
WITH Distance AS ( SELECT "Scenic_Id",ST_DISTANCE_SPHERE(ST_MAKEPOINT("Scenic_Lon","Scenic_Lat"),ST_MAKEPOINT(104.036058,30.666089)) AS "Length" FROM "tbScenics" WHERE "Scenic_Lat">20.001 AND "Scenic_Lat"<50.001 AND "Scenic_Lon">80.001 AND "Scenic_Lon"<105.001 ORDER BY "Length" ASC) SELECT "tbScenics".*,"Length","Length" /10 FROM "tbScenics",Distance WHERE Distance."Scenic_Id"="tbScenics"."Scenic_Id" ORDER BY "Length" ASC; SELECT "tbScenics".*,30.666089)) AS "Length",30.666089))/10 FROM "tbScenics" WHERE "Scenic_Lat">20.001 AND "Scenic_Lat"<50.001 AND "Scenic_Lon">80.001 AND "Scenic_Lon"<105.001 ORDER BY "Length" ASC; 原文链接:https://www.f2er.com/postgresql/194826.html

猜你在找的Postgre SQL相关文章