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 for MyISAM, InnoDB, NDB, and ARCHIVE tables. See also the annotations about spatial indexes under , "Creating Spatial Indexes".
- Use the
CREATE TABLEstatement to create a table with a spatial column:CREATE TABLE geom (g GEOMETRY);
- Use the
ALTER TABLEstatement to add or drop a spatial column to or from an existing table: