Skip to content

Instantly share code, notes, and snippets.

@afonsoaugusto
Last active January 29, 2018 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afonsoaugusto/7dc69378410866c4db838ae4dfc96281 to your computer and use it in GitHub Desktop.
Save afonsoaugusto/7dc69378410866c4db838ae4dfc96281 to your computer and use it in GitHub Desktop.
CREATE TABLE points (pt POINT);
SET @intptlon10 = ST_GeomFromText('POINT(-19.758839 -43.939613)');
SET @intptlat10 = ST_GeomFromText('POINT(-19.758839 -43.939613)');
insert into points values (@intptlon10);
insert into points values (@intptlat10);
mysql> SELECT ST_AsText(pt) FROM points;
+------------------------------+
| ST_AsText(pt) |
+------------------------------+
| POINT(-19.758839 -43.939613) |
| POINT(-19.758839 -43.939613) |
+------------------------------+
2 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment