CREATE TABLE table_name (
geom_column_name GEOMETRY
);
INSERT INTO table_name (geom_column_name) VALUES (ST_GeomFromText('POINT(x y)'));
SELECT ST_AsText(geom_column_name) FROM table_name;
SELECT ST_Area(geom_column_name) FROM table_name;
SELECT ST_Perimeter(geom_column_name) FROM table_name;
SELECT ST_Intersects(geom_column_name1, geom_column_name2) FROM table_name;
SELECT ST_Distance(geom_column_name1, geom_column_name2) FROM table_name;
SELECT ST_Intersection(geom_column_name1, geom_column_name2) FROM table_name;
这些是MySQL中常用的Geometry相关的SQL语句,可以用来操作和计算Geometry类型的数据。
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>