MSSMS SQL I am trying to create function which returns total number of people from 2 tablets

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.

1 Like