我正在做一个MySQLand的错误,我不知道如何修复它。函数应该做的是要求用户输入,这个输入应该存储在相应的变量中并返回一个变量。但是,当我尝试运行函数时,在存储变量的行上会出现错误。我对mySQL很陌生,所以我可能在做一些蠢事。任何帮助都会很好的谢谢
这是mysql函数
create or replace FUNCTION AD_AGENCY_INFO(agency_id in agency_id%type)
RETURN agency_id
DECLARE
v_no_of_runs AD_AGENCY.NO_OF_AD_RUNS%TYPE = '&enter_number_of_Runs';
v_credit_worthy AD_AGENCY.CREDIT_WORTHY%TYPE = '&enter_credit_worthy';
v_available_slots AD_AGENCY.AVAILABLE_SLOTS%TYPE = '&enter_available_slots';
v_status AD_AGENCY.STATUS%TYPE = '&enter_status';
BEGIN
insert into ad_agency values (agency_id, v_no_of_runs, v_credit_worthy,v_available_slots, v_status);
insert into ad (agency_id) values (agency_id);
commit;
RETURN (agency_id));
END AD_AGENCY_INFO;我得到的错误如下,第7行、第8行、第9行相同
Error(6,45): PLS-00103: Encountered the symbol "=" when expecting one of the following: := ( ; not null range default character The symbol ":= was inserted before "=" to continue. 发布于 2014-11-26 14:01:36
尝试将您的声明语句更改为
v_no_of_runs AD_AGENCY.NO_OF_AD_RUNS%TYPE := '&enter_number_of_Runs'https://stackoverflow.com/questions/27149178
复制相似问题