+ 2
how could I insert different data into different tables at once?
2 Respostas
+ 1
you can create a routine (function or sp) and then call it when you want to multiple insert.
eg:
delimiter //
create function multipleInsert(d1 varchar(20), d2 varchar(20))
begin
insert into t1(col1) value(d1);
insert into t2(col2) value(d2);
end
//
So whenever you want to insert do this:
select multipleInsert('data1', 'data2');
I hpoe it will help.
+ 2
run multiple queries