Home > database >  Why I write a mysql function, an error, please correct what to write
Why I write a mysql function, an error, please correct what to write

Time:09-22

The create function test () returns an int
The begin

The create table a (int a);
Int the create table b (b);
return 1;
end

CodePudding user response:

ERROR 1422 (HY000) : Explicit or implicit commit is not allowed in stored function or trigger.

Cannot do DDL in function, also is cannot build table, give up the idea
  • Related