1

I want to create a new table for every row that is inserted into an existing table.

As I understand only DML operation is allowed on trigger, is it correct. If so is there a alternative way of achieving my objective?

1 Answers1

1

SQLite indeed allows only DML in a trigger body.

However, you could do a SELECT with a user-defined function that then executes another SQL command to create the table:

CREATE TRIGGER ...
...
BEGIN
    SELECT my_create_table_function(NEW.name);
END;
CL.
  • 173,858
  • 17
  • 217
  • 259