DELIMITER $$
CREATE PROCEDURE ifconditionerror(
IN emplyee_id INT,
IN employee_name VARCHAR(200),
FLAG TINYINT)
BEGIN
IF FLAG = 1 THEN
INSERT INTO EMPLOYEES (id, name)
VALUES (emplyee_id , employee_name);
ELSE
SET MESSAGE_TEXT = 'Data already exists';
END IF;
END $$
DELIMITER ;
I want mysql query in this one row data is there it will show error and in that there is no data that row will executed i want like that data in mysql Answer
New contributor
Harikrishna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1