SQL insert into multiple rows and parameters

Hi, I want to insert several records which are redundant in my libre office database.

I have two tables : table1 and table2 which are connected by a 1 to many relationship.
Basically I must insert one record in table1 and then some other records in table2

I went to tools—>SQL
And then I typed :
INSERT INTO "table1" ("whatever", "field") VALUES (2,'some text');
This worked like a charm.

Then I tried to insert multiple rows to table2:
INSERT INTO "table2" ("idEcriture", "idCompte","credit","idLocataire","idBien") VALUES (415,706000,450,1,1), (415,708000,80,1,1), (415,626100,15,1,1), (415,606130,28,1,1), (415,606110,27,1,1);
Here 415 is the coresponding key in table 1. So I had to check first that it was 415. Not very handy.

I get the error :

1: Unexpected token: , in statement [,]

So here are several questions :

  • How can I insert multiple rows? What am I doing wrong?
  • Can I use parameters in my request : I will have to do this operation several times (like 12 times)
    I want something like :
    declare @idEcriture int set @idEcriture = 415; INSERT INTO “table2” (“idEcriture”, “idCompte”,“credit”,“idLocataire”,“idBien”)
    VALUES (@idEcriture,706000,450,1,1),
    `

Is there a way for me to I enter the whole thing in one operation? Like (one record in table1 and then the 5 corresponding records in table2) and this 12 times. I am thinking af a loop.

I hope I made myself clear.

Why not end the first insert for table2 with “;” and then the second insert and again end it with “;” And so on till all 4 insert for table2 has been written and end with final “;”.
That is my first thought. If this sql is lengthy, edit it in a notepad like appl.
So multiple rows multiple inserts.

What you are proposing is exactly the redundant process I want to avoid as it is not optimised at all. In the end as I had no solution, I created a spreadsheet which automatises a bit the writing and made a drag and drop of the entries in each table. But the two drags and drop it requires still seem very manual and unsafe to me, as I make sure the relationships are respected. I would prefer the sql to take care of this.