POINT¶
The POINT data type stores a two-dimensional point with x and y coordinates.
Creating a Table with a POINT Column¶
Inserting POINT Values¶
Use the POINT function to create a point value:
Querying POINT Values¶
Updating and Deleting POINT Values¶
UPDATE PointGroup
SET point_field = POINT(2.0, 1.0)
WHERE point_field = POINT(0.3134, 0.156);
DELETE FROM PointGroup
WHERE point_field = POINT(2.0, 1.0);
Casting Text to POINT¶
Related Functions¶
POINT(x, y)creates a point value.GET_X(point)returns the x-coordinate.GET_Y(point)returns the y-coordinate.CALC_DISTANCE(point1, point2)returns the distance between two points.