Notă
Accesul la această pagină necesită autorizare. Puteți încerca să vă conectați sau să modificați directoarele.
Accesul la această pagină necesită autorizare. Puteți încerca să modificați directoarele.
Important
This feature is in Public Preview. You can confirm preview enrollment on the Previews page. See Manage Azure Databricks previews.
Applies to:
Databricks SQL
Databricks Runtime 17.0 and above
Drops a user defined procedure.
To drop a function you must have the MANAGE privilege on the procedure, be its owner, or the owner of the schema, catalog, or metastore the procedure resides in.
Syntax
DROP PROCEDURE [ IF EXISTS ] procedure_name
Parameters
-
The name of an existing procedure. The procedure name may be optionally qualified with a schema name.
IF EXISTS
If specified, no exception is thrown when the procedure does not exist.
Examples
-- Create a procedure `hello`
> CREATE PROCEDURE hello() SQL SECURITY INVOKER LANGUAGE SQL
AS BEGIN
SELECT 'hello!';
END;
-- Drop the procedure
> DROP PROCEDURE hello;
-- Try to drop a procedure which is not present
> DROP PROCEDURE hello;
Error: ROUTINE_NOT_FOUND
-- Drop a procedure only if it exists
> DROP PROCEDURE IF EXISTS hello;