How to delete a SQL Server function?

How to delete a SQL Server function? This SQL command delete the SQL Server function. However, it does not check if the function exists.

How to delete a SQL Server function?

Use this T-SQL code to delete the function from the database, the function will be permanently deleted. To avoid errors in case the object is not anymore in the database, use an existence check before call the delete command.

  1. DROP FUNCTION ufnDisplayCustomers;

Be the first to comment

Leave a Reply