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 如果不存在具有SRID值的SRS定义,则会发生错误,除非指定了IF EXISTS
is specified. IF EXISTS
。In 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位无符号整数的范围内,并有以下限制:
SRID 0 is a valid SRID but cannot be used with SRID 0是有效的SRID,但不能与DROP SPATIAL REFERENCE SYSTEM
.DROP SPATIAL REFERENCE SYSTEM
一起使用。
If the value is in a reserved SRID range, a warning occurs. 如果该值在保留SRID范围内,则会出现警告。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). 保留范围为[0,32767](由EPSG保留)、[60,000,000, 69,999,999](由EPSG保留)和[2,000,000,000, 2,147,483,647](由MySQL保留)。EPSG stands for the European Petroleum Survey Group.EPSG代表欧洲石油调查集团。
Users should not drop SRSs with SRIDs in the reserved ranges. 用户不应删除SRID在保留范围内的SRS。If system-installed SRSs are dropped, the SRS definitions may be recreated for MySQL upgrades.如果删除系统安装的SRS,则可能会为MySQL升级重新创建SRS定义。