Last active
January 29, 2018 13:22
-
-
Save afonsoaugusto/9553640307990af093a3f3cb18f79b06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Inclusão no CREATE TABLE: | |
CREATE TABLE point_example (p POINT NOT NULL, SPATIAL INDEX(p)); | |
-- Inclusão com ALTER TABLE: | |
drop table point_example; | |
CREATE TABLE point_example (p POINT NOT NULL); | |
ALTER TABLE point_example ADD SPATIAL INDEX(p); | |
--com CREATE INDEX: | |
drop table point_example; | |
CREATE TABLE point_example (p POINT NOT NULL); | |
CREATE SPATIAL INDEX g ON point_example (p); | |
mysql> desc point_example; | |
+-------+-------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+-------+-------+------+-----+---------+-------+ | |
| p | point | NO | MUL | NULL | | | |
+-------+-------+------+-----+---------+-------+ | |
1 row in set (0.01 sec) | |
--com ALTER TABLE: | |
ALTER TABLE point_example DROP INDEX g; | |
--com DROP INDEX: | |
DROP INDEX g ON point_example; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment