0
你能幫我找到存儲過程中的錯誤嗎?謝謝!!!無法修復存儲過程錯誤
CREATE PROCEDURE realiza_tracking_primer_lectura ( in v_campaign_id int(11), in v_ares_emails_id int(11), in v_userid int(11), in v_country varchar(2), in v_ip varchar(15), in v_useragent varchar(255), in v_time int(11)) BEGIN DECLARE ReadBefore int DEFAULT null; if v_campaign_id is Null then SELECT userid FROM tracking_lecturas WHERE ares_emails_id = v_ares_emails_id and userid = v_userid into ReadBefore; Else SELECT userid FROM tracking_lecturas WHERE campaign_id = v_campaign_id and userid = v_userid into ReadBefore; end if; if ReadBefore is Null then insert into tracking_lecturas (campaign_id, ares_emails_id, userid, ip, useragent, timestamp) values (v_campaign_id, v_ares_emails_id, v_userid, v_ip, v_useragent, v_time); end if; END DELIMITER;
請分享你得到的錯誤 - 沒有編制?編譯但運行時錯誤?運行但結果不正確? –
運行或編譯時出錯? –