You are on page 1of 1

create table student (Rollno int,Regno int,name char(15),primary key(Rollno));

CREATE PROCEDURE excepdemo(IN Rollno INT,IN Regno INT,name char(15))


BEGIN
DECLARE CONTINUE HANDLER for 1062
SELECT CONCAT('Duplicate Keys(Rollno)found') AS msg;
INSERT INTO student values(Rollno,Regno,name);
select COUNT(*) from student;
END $$

You might also like