Hi Mylogics,
My question is why you are adding a trigger to check existing records.
you can just check in query in same sp that is you are using to inserts records in db table.
to create trigger you can write code as
CREATE TRIGGER trgname
BEFORE INSERT ON my_table_name
FOR EACH ROW
BEGIN
IF something THEN
#do somthing
END IF;
END;