DROP SPATIAL REFERENCE SYSTEM
[IF EXISTS]
srid
srid: 32-bit unsigned integer
此语句移除了数据字典中的 空间参考系统(SRS)定义。它需要 SUPER 权限。This statement removes a
spatial reference
system (SRS) definition from the data dictionary. It
requires the SUPER privilege.
示例:Example:
DROP SPATIAL REFERENCE SYSTEM 4120;
如果没有带有 SRID 值的 SRS 定义,除非指定IF EXISTS。此时,会触发警告而非错误。If no SRS definition with the SRID value exists, an error occurs
unless IF EXISTS is specified. In that case, a
warning occurs rather than an error.
如果已有表中的某列使用了 SRID 值,则会发生错误。例如:If the SRID value is used by some column in an existing table, an error occurs. 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.
要识别哪些列或列使用 SRID,请使用此查询:To identify which column or columns use the SRID, use this query:
SELECT * FROM INFORMATION_SCHEMA.ST_GEOMETRY_COLUMNS WHERE SRS_ID=4326;
SRID 值必须在 32 位无符号整数的范围内,并具有以下限制:SRID values must be in the range of 32-bit unsigned integers, with these restrictions:
SRID 0 是有效的 SRID,但不能用于
DROP SPATIAL REFERENCE SYSTEM“。SRID 0 is a valid SRID but cannot be used withDROP SPATIAL REFERENCE SYSTEM.如果该值处于保留的 SRID 范围内,则会出现警告。保留范围为 [0, 32767](由 EPSG 保留)、[60,000,000, 69,999,999](由 EPSG 保留)和 [2,000,000,000, 2,147,483,647](由 MySQL 保留)。EPSG 代表 欧洲石油测量组。If the value is in a reserved SRID range, a warning occurs. Reserved ranges are [0, 32767] (reserved by EPSG), [60,000,000, 69,999,999] (reserved by EPSG), and [2,000,000,000, 2,147,483,647] (reserved by MySQL). EPSG stands for the European Petroleum Survey Group.
用户不应丢弃保留范围内 SRID 的 SRS。如果系统安装的 SRS 被丢弃,可以在 MySQL 升级时重新创建 SRS 定义。Users should not drop SRSs with SRIDs in the reserved ranges. If system-installed SRSs are dropped, the SRS definitions may be recreated for MySQL upgrades.