-- Its Same as ITVF (Inline Table Valued function) to return a table as output
-- MTVF THE STRURCURE OF THE TABLE RETRUN FROM THE FUNCTION IS DEFINED BY USERS.
-- WHERE AS IN ITVF table is defined by the select statement which we used in return in the body
-- It must contains BEGIN and END
-- Syntax:
CREATE FUNCTION FUNCTIONNAME
( @para 1 datatype,
@Para 2 datatype
)
RETURNS @TableVariable TABLE (COL1,COL2,.. COLN)
AS
BEGIN
-- FUNCTION BODY
RETURN
END
#sqlserver #sqlservermanagementstudio #ssms #rdbms #tsql #userdefinedfunction #tableview #database #dataanalytics #sqlforbeginners