How about? I have a doubt I want to make a procedure so that the end result of a result 0 or 1 according to the result number of my table users the procedure is this:
DELIMITER $$
CREATE PROCEDURE Coretec_ConfirmUser(IN p_user_mail VARCHAR(150),OUT p_result INT)
BEGIN
DECLARE rows INT;
SET rows=SELECT COUNT(users.user_id) FROM users WHERE users.user_mail=p_user_mail;
IF (rows>=1) THEN
SET p_result=1;
ELSE
SET p_result=0;
END IF;
SELECT p_result;
END $$
DELIMITER ;
in the end, this error votes me: Error
SQL query:
CREATE PROCEDURE Coretec_ConfirmUser (IN p_user_mail VARCHAR (150), OUT p_result INT) BEGIN DECLARE rows INT
MySQL has said:
1064 - Something is wrong in its syntax near '' on line 3