我创建了一个函数
Select * from f_get_employees1()我想在存储过程中调用这个函数。
我不知道为什么你需要调用一个函数到过程。你不需要这么做。即使这样,我也会给出一些参考,这样你就能明白你想要什么了。
CREATE OR REPLACE PROCEDURE dbo.spForCustomerINfo(
p_name character varying DEFAULT ''::character varying,
p_mobile character varying DEFAULT ''::character varying,
p_email character varying DEFAULT ''::character varying,
p_password character varying DEFAULT ''::character varying,
p_dob timestamp(3))
LANGUAGE 'plpgsql'
AS $BODY$
Declare p_CurrentAge varchar(20);
begin
-- Get User Current Age
Select dbo.fnGetCurrentAgeOfuser(p_dob) into p_CurrentAge;
----- Insert User Data
insert into dbo.Customer(name,mobile,email,password,DOB,CurrentAge)
values(p_name,p_mobile,p_email,p_password,p_dob,p_CurrentAge);
commit;
end;
$BODY$;