Posted on 16th September 2024|48 views
What is Drop function in PostgreSQL?
Posted on 16th September 2024| views
Syntax:
Drop Function function_name;
function_name =function the user wishes to drop.
For example:
DROP FUNCTION power(integer, integer); #removes the power function
DROP FUNCTION my_details; #removes functions without arguments also
CREATE FUNCTION add(number,number);
Now, after using that function when you wish to drop that function, we use the command.
DROP FUNCTION add(number,number);
This function will drop objects that depend on that function.
This function is by default. It refuses the function to drop any objects that depend on that function.