what is error in this code???????????????
i want that if emailid is already exist
then set try again otherwise set successfully
CREATE PROCEDURE SP_Registration(in regid int,IN user_type varchar(255),IN user_name varchar(255),
IN email_id varchar(255),
IN pass_word varchar(255),
IN moblie bigint,
IN landline bigint,
IN current_city int,
OUT messages varchar(100)
)
BEGIN
IF EXISTS(SELECT email_id from registration where email_id ='email_id');
IF ROW_COUNT()>0 THEN
set message='try again';
end if;
ELSE
insert INTO registration(registration_id,user_type,user_name,email_id,pass_word,moblie,landline,current_city) values (regid,user_type,user_name,email_id,pass_word,moblie,landline,current_city);
IF ROW_COUNT()> 0 THEN
set message='succcessfully inserted';
end if;
end;
END;