Answer the question
In order to leave comments, you need to log in
An error occurs when trying to write the second row to the table. How to fix?
MySQL 5.7 has a stored function that writes to the database:
CREATE function `insert_material` (_guid char(36), _name varchar(255)) returns int
BEGIN
declare b_guid binary(16);
set b_guid = unhex(replace(_guid, '-', ''));
insert into Material(guid, name) value(b_guid, _name);
return LAST_INSERT_ID();
END
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question