DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) Creating spatial columns

Info Catalog (mysql.info.gz) Creating spatial values (mysql.info.gz) Creating a spatially enabled MySQL database (mysql.info.gz) Populating spatial columns
 
 18.4.3 Creating Spatial Columns
 -------------------------------
 
 MySQL provides a standard way of creating spatial columns for geometry
 types, for example, with `CREATE TABLE' or `ALTER TABLE'.  Currently,
 spatial columns are supported only for `MyISAM' tables.
 
    * Use the `CREATE TABLE' statement to create a table with a spatial
      column:
 
           mysql> CREATE TABLE geom (g GEOMETRY);
           Query OK, 0 rows affected (0.02 sec)
 
    * Use the `ALTER TABLE' statement to add or drop a spatial column to
      or from an existing table:
 
           mysql> ALTER TABLE geom ADD pt POINT;
           Query OK, 0 rows affected (0.00 sec)
           Records: 0  Duplicates: 0  Warnings: 0
           mysql> ALTER TABLE geom DROP pt;
           Query OK, 0 rows affected (0.00 sec)
           Records: 0  Duplicates: 0  Warnings: 0
 
 
Info Catalog (mysql.info.gz) Creating spatial values (mysql.info.gz) Creating a spatially enabled MySQL database (mysql.info.gz) Populating spatial columns
automatically generated byinfo2html