这是我的查询
react-select
返回
SELECT
*
FROM (
SELECT
getlatlng("geom")
FROM
mytable
) AS subquery;
我想写
(-121.9,36.4)
(-117.1,32.9)
(-121.9,36.5)
(-71.2,42.6)
让它返回
SELECT
subquery.lat, subquery.lon
FROM (
SELECT
getlatlng("mygeom")
FROM
mytable
) AS subquery;
以下是函数的相关位。
lat | lon
-------------
36.4 | -121.9
32.9 | -117.1
36.5 | -121.9
42.6 | -71.2
答案 0 :(得分:2)
尝试:
SELECT (p).longitude, (p).latitude FROM (
SELECT getlatlng("mygeom") p
FROM mytable
) subquery
函数的OUT
参数定义了返回记录的列。