Earlier this week, I found myself coming to an usecase of inserting multiple rows within one SQLite query. The idea is something like this in MySQL:
The similar syntax is also available for SQLite 3.7.11
and above; however for older versions of SQLite, this syntax won’t work. Fortunately,
there is another way to do the same thing, with the help of
UNION ALL operator:
Of course, the second way has backward compatibility for the older versions of SQLite. Also notice that there is no performance advantage one way or the other (between the above mentioned two syntaxes).