ST_Dimension(g)

Returns the inherent dimension of the geometry value g, or NULL if the
argument is NULL. The dimension can be −1, 0, 1, or 2. The meaning of
these values is given in
http://dev.mysql.com/doc/refman/5.7/en/gis-class-geometry.html.

URL: http://dev.mysql.com/doc/refman/5.7/en/gis-general-property-functions.html

