ST_ASTEXT
functionsupportedCore SQL functionsGiven a value of type GEOGRAPHY or GEOMETRY, return the text (VARCHAR) representation of that value in WKT (well-known text) format.
Syntax
Use one of the following
ST_ASWKT( <geography_or_geometry_expression> )
ST_ASTEXT( <geography_or_geometry_expression> )
Parameters
| Name | Required | Description |
|---|---|---|
geography_or_geometry_expression | required | The argument must be an expression of type GEOGRAPHY or GEOMETRY. |
Returns
A VARCHAR.
Usage notes
- ST_ASTEXT is an alias for ST_ASWKT.
- To return the output in EWKT format, use ST_ASEWKT instead.