Returns the WKT representation of an ST_Geometry value.
Syntax
geometry-expression.ST_AsWKT(VARCHAR(128) format)
Parameters
format –
A string defining the output text format to use when converting the geometry-expression to WKT. If not specified, the format string defaults to 'WKT'.
Returns
LONG VARCHAR Returns the WKT representation of the geometry-expression.
Examples
Example 1 –
The following example returns the result SRID=0;Polygon ((3 3, 8 3, 4 8, 3 3)).
SELECT Shape.ST_AsWKT( 'EWKT' ) FROM SpatialShapes WHERE ShapeID = 22