DROP PROCEDURE and DROP FUNCTION Statements 13.1.29 DROP PROCEDURE and DROP FUNCTION Statements 13.1.30 DROP SERVER Statement 13.1.31 DROP SPATIAL REFERENCE SYSTEM Statement These statements are used to drop a stored routine (a stored procedure or function). That is, the specified routine is removed from the server. ( DROP FUNCTION  is also used to drop loadable functions; see Section 13.7.4.2, “DROP FUNCTION Statement for Loadable Functions” .) To drop a stored routine, you must have the  ALTER ROUTINE  privilege for it. (If the automatic_sp_privileges  system variable is enabled, that privilege and  EXECUTE  are granted automatically to the routine creator when the routine is created and dropped from the creator when the routine is dropped. See Section 25.2.2, “Stored Routines and MySQL Privileges” .) The  IF EXISTS  clause is a MySQL extension. It prevents an error from occurring if the procedure or function does not exist. A warning is produced that can be viewed with  SHOW WARNINGS . DROP FUNCTION  is also used to drop loadable functions (see Section 13.7.4.2, “DROP FUNCTION Statement for Loadable Functions” ). Drops the server definition for the server named  server_name . The corresponding row in the mysql.servers  table is deleted. This statement requires the  SUPER  privilege. Dropping a server for a table does not affect any  FEDERATED  tables that used this connection information when they were created. See Section 13.1.18, “CREATE SERVER Statement” . DROP SERVER  causes an implicit commit. See Section 13.3.3, “Statements That Cause an Implicit Commit” . DROP SERVER  is not written to the binary log, regardless of the logging format that is in use. This statement removes a spatial reference system (SRS) definition from the data dictionary. It requires the SUPER  privilege. Example: 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. If the SRID value is used by some column in an existing table, an error occurs. For example: To identify which column or columns use the SRID, use this query: 2613 mysql>  DROP SPATIAL REFERENCE SYSTEM 4326; ERROR 3716 (SR005): Can’t modify SRID 4326. There is at least one column depending on it. DROP SPATIAL REFERENCE SYSTEM 4120; DROP SPATIAL REFERENCE SYSTEM [IF EXISTS] srid srid :  32-bit unsigned integer DROP SERVER [ IF EXISTS ]  server_name DROP {PROCEDURE | FUNCTION} [IF EXISTS]  sp_name