how can this throw an error when trying to create a trigger before insert in MySQL so that it generates new UUID for every input.
CREATE TRIGGER insert_guid
BEFORE INSERT ON guid_tool (FOR EACH ROW
BEGIN
SET NEW.guid_key = UUID());
END;
and here is my table
create table guid_tool (
ID INT NOT NULL AUTO_INCREMENT,
guid_key CHAR(40) NOT NULL,
PRIMARY KEY(ID)
) CHARSET=LATIN1;
I must be doing something wrong.