13.1.31 DROP SPATIAL REFERENCE SYSTEM Statement语句

DROP SPATIAL REFERENCE SYSTEM
    [IF EXISTS]
srid
srid: 32-bit unsigned integer

This statement removes a spatial reference system (SRS) definition from the data dictionary. 此语句从数据字典中删除空间参考系(SRS)定义。It requires the SUPER privilege.它需要SUPER特权。

Example:例子:

DROP SPATIAL REFERENCE SYSTEM 4120;

If no SRS definition with the SRID value exists, an error occurs unless IF EXISTS is specified. 如果不存在具有SRID值的SRS定义,则会发生错误,除非指定了IF EXISTSIn that case, a warning occurs rather than an error.在这种情况下,会出现警告而不是错误。

If the SRID value is used by some column in an existing table, an error occurs. 如果现有表中的某列使用了SRID值,则会发生错误。For example:例如:

mysql> DROP SPATIAL REFERENCE SYSTEM 4326;
ERROR 3716 (SR005): Can't modify SRID 4326. There is at
least one column depending on it.

To identify which column or columns use the SRID, use this query:要确定哪些列使用SRID,请使用以下查询:

SELECT * FROM INFORMATION_SCHEMA.ST_GEOMETRY_COLUMNS WHERE SRS_ID=4326;

SRID values must be in the range of 32-bit unsigned integers, with these restrictions:SRID值必须在32位无符号整数的范围内,并有以下限制: