这个小小的一个给我语法问题,我无法解决,我会很感激。
DELIMITER $$
CREATE procedure kullanicibilgicek
(
p_kadi varchar(50)
)
begin
declare v_sonuc INT;
if(CHAR_LENGTH(RTRIM(p_kadi)) > 4)
then
if exists (select kullanicilar.kullaniciadi, kullanicilar.sifre from kullanicilar where kullaniciadi = p_kadi)
then
select id, upper(left(ad,1))+ right(ad, char_length(rtrim(ad)) -1), upper(left(soyad,1))+ right(soyad, char_length(rtrim(soyad)) -1), yetki, upper(left(kullaniciadi,1))+ right(kullaniciadi, char_length(rtrim(kullaniciadi)) -1), kullanicilar.sifre from kullanicilar where kullaniciadi = p_kadi;
else
set v_sonuc = 0;
select v_sonuc;
end if;
else
if exists (select kullanicilar.kullaniciadi, kullanicilar.sifre from kullanicilar where id = Cast(p_kadi as int))
then
select id, upper(left(ad,1))+ right(ad, char_length(rtrim(ad)) -1), upper(left(soyad,1))+ right(soyad, char_length(rtrim(soyad)) -1), yetki, upper(left(kullaniciadi,1))+ right(kullaniciadi, char_length(rtrim(kullaniciadi)) -1), kullanicilar.sifre from kullanicilar where id = cast(p_kadi as int);
else
set v_sonuc = 0;
select v_sonuc;
end if;
end if;
END;
$$
DELIMITER ;
#1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以获得正确的语法 在第18行
'int)) then select id, upper(left(ad,1))+ right(ad, char_length(rtrim(ad)) -1'
附近