5. Geospatial Functions : PointFromText
 
Share this page                  
PointFromText
POINTFROMTEXT(s string [, srid integer])
Alias: ST_POINTFROMTEXT
Returns a point that corresponds to the Well Known Text (WKT) in s. The SRID can optionally be specified. It is ‑1 by default.
Result type: point
Example: Retrieve text representation of point after specifying point with text representation:
SELECT ASTEXT(POINTFROMTEXT('POINT(1 2)'));
--------------------------------
col1
--------------------------------
POINT (1 2)
--------------------------------