ALTER FUNCTION dbo.temp1
(
/*
@parameter1 datatype = default value,
@parameter2 datatype
*/
)
RETURNS @cst_制程工序_temp TABLE
(
id int,
parid int,
desc1 nvarchar(50)
)
AS
BEGIN
/* INSERT INTO @table_variable
sql select statement */
/* alternative sql statement or statements */
RETURN
END