CREATE PROCEDURE sp_test()
BEGIN
declare cnt int;
select 1 from account where username='123' into cnt;
if cnt != 0 then
insert into account (username,passwd) values('123','123');
end if;
END$$
CREATE PROCEDURE sp_test()
BEGIN
declare cnt int;
select 1 from account where username='123' into cnt;
if cnt != 0 then
insert into account (username,passwd) values('123','123');
end if;
END$$