Using GEOMFROMTEXT function: Creates the internal MySQL GEOMETRY format from a WKT string.
mysql>
mysql> CREATE TABLE mytable (
-> id INT NOT NULL PRIMARY KEY,
-> border POLYGON NOT NULL,
-> ela LINESTRING,
-> ref POINT
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> INSERT INTO mytable(ref) VALUES(GEOMFROMTEXT('POINT(681547 5237595)'));
Query OK, 1 row affected, 2 warnings (0.00 sec)
mysql>
mysql> drop table mytable;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category