Reviewing the documentation syntax on INSERT INTO ...
, which to me judgment is not entirely clear, it would seem that it is possible to insert a list of values in the same column.
{VALUES | VALUE} (value_list) [, (value_list)] ...
When reading VALUE
and then next, two possibilities of value_list
, it would seem that it is possible to do something like this:
INSERT INTO liturgia_biblicas (id_pericopa) VALUE (685,1281,1282);
In the query, the idea is to insert three new rows in the table, with id_pericopa
equal to 685
in one row, 1281
in another row and 1282
in another.
But the query fails:
Column count doesn't match value count at row 1
And if I write it that way, it also gives an error:
INSERT INTO liturgia_biblicas (id_pericopa) VALUES (685,1281,1282);
Is it possible to insert several rows in the same column without having to use the parentheses for each row? How should I write the query if possible?
It would be useful to be able to do it this way in some contexts in which I manually receive a list of values to insert in my table manually.