Comments - use trigger for create table

10 years, 8 months ago bhdbing bhdbing

so it is "dynamic SQL" can't be contained within trigger? if i want when somebody insert a record data into a specified table the DB create a table automatically,how can i do ?

 
10 years, 8 months ago Sergei Golubchik

you cannot, as far as I can see.

CREATE TABLE is a DDL, it automatically commits the current transaction. And you cannot commit from inside a trigger. Explicitly or implicitly.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.