各位,急!!!!请问是哪的问题,要怎么改???感谢了。mysql> delimiter $$
mysql> create procedure cj_data(in_xh char(8),in_kch char(4),in int(4))
-> begin
-> declare in_count int(4);
-> declare in_xf tinyint(1);
-> declare in_cjb_cj int(4);
-> select xf into in_xf from kcb where kch=in_kch;
-> select count(*)into in_count from cjb where xh=in_xh and kch=in_kch;
-> select cj into in_cjb_cj from cjb where xh=in_xh and kch =in_kch;
-> if in_count>0 then
-> begin
-> delete from cjb where xh=in_xh and kch=in_kch;
-> if in_cjb_cj>60 then
-> update xsb set zxf=zxf-in_xf where xh=in_xh;
-> end if;
-> end;
-> end if;
-> if in_cj!=-1 then
-> begin
-> insert into cjb values(in_xh,in_kch,in_cj);
-> if in_cj>60 then
-> update xsb set zxf=zxf+in_xf where xh=in_xh;
-> end if;
-> end;
-> end if;
-> end$$
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'int(4
))
begin
declare in_count int(4);
declare in_xf tinyint(1);
declare in_cjb_' at line 1
mysql> delimiter;
mysql> create procedure cj_data(in_xh char(8),in_kch char(4),in int(4))
-> begin
-> declare in_count int(4);
-> declare in_xf tinyint(1);
-> declare in_cjb_cj int(4);
-> select xf into in_xf from kcb where kch=in_kch;
-> select count(*)into in_count from cjb where xh=in_xh and kch=in_kch;
-> select cj into in_cjb_cj from cjb where xh=in_xh and kch =in_kch;
-> if in_count>0 then
-> begin
-> delete from cjb where xh=in_xh and kch=in_kch;
-> if in_cjb_cj>60 then
-> update xsb set zxf=zxf-in_xf where xh=in_xh;
-> end if;
-> end;
-> end if;
-> if in_cj!=-1 then
-> begin
-> insert into cjb values(in_xh,in_kch,in_cj);
-> if in_cj>60 then
-> update xsb set zxf=zxf+in_xf where xh=in_xh;
-> end if;
-> end;
-> end if;
-> end$$
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'int(4
))
begin
declare in_count int(4);
declare in_xf tinyint(1);
declare in_cjb_' at line 1
mysql> delimiter;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货