Just for some clarity:
DROP FUNCTION IF EXISTS dbo.ufnGetInventoryStock;
GO
CREATE OR ALTER FUNCTION dbo.ufnGetInventoryStock
Just for some clarity:
DROP FUNCTION IF EXISTS dbo.ufnGetInventoryStock;
GO
CREATE OR ALTER FUNCTION dbo.ufnGetInventoryStock
Don't drop the function, because that will lose all permissions, extended properties and the original create_date, etc. of the function.