CREATE PROCEDURE caiji(in title varchar(20),in shijian varchar(16),
in laiyuan varchar(20),in zhaiyao varchar(),in suoluetu varchar(),in neirong varchar())
BEGIN
insert into pre_portal_article_title(username,title,summary,dateline) values(laiyuan,title,zhaiyao,shijain);
insert into pre_portal_article_content(content,suoluetu) values(neirong,suoluetu);
END;
这个存储过程同事调用了两个表,pre_portal_article_title和pre_portal_article_content,但是在调用存储过程的时候出错了:
存储过程1执行失败:PROCEDURE ultrax.pre_portal_article_content does not existMySql.Data.MySqlClient.MySqlPacket ReadPacket()。语句:CALL pre_portal_article_content('','','','','','')
请教:这个存储过程写的哪个地方写错了啊?
黄舟2017-04-17 16:28:32
数据类型varchar()
,括号里的数据长度漏掉了,加上就可以了,
CREATE PROCEDURE
caiji
(
in title varchar(20),
in shijian varchar(16),
in laiyuan varchar(20),
in zhaiyao varchar(20),
in suoluetu varchar(20),
in neirong varchar(20)
)
BEGIN
insert into pre_portal_article_title(username,title,summary,dateline) values(laiyuan,title,zhaiyao,shijain);
insert into pre_portal_article_content(content,suoluetu) values(neirong,suoluetu);
END;
这个,你格式化一下SQL
语句就能看出来...