- Categories:
ST_ ASWKT , ST_ ASTEXT¶
Given a value of type GEOGRAPHY or GEOMETRY, return the text (VARCHAR) representation of that value in WKT (well-known text) format.
- See also:
Syntax¶
Use one of the following:
Arguments¶
geography_or_geometry_expressionThe 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.
Examples¶
GEOGRAPHY examples¶
The following example demonstrates the ST_ASWKT function:
GEOMETRY examples¶
The example below demonstrates how to use the ST_ASEWKT function. The example returns the EWKT representations of two geometries.