I have a table with 5 columns:
CREATE TABLE "voc"."MyTable" (
"c_1" TINYINT,
"c_2" TINYINT,
"c_3" TINYINT,
"c_4" TINYINT,
"c_5" TINYINT
);
I want to calculate the values for each column in separate, and insert the values for this column only. e.g.
INSERT INTO "voc"."MyTable"(c_1)
SELECT ....
This Insert command inserts 5000 rows into MyTable, with the values for c_1 column and null for all the other columns. If I run now
INSERT INTO "voc"."MyTable"(c_2)
SELECT ....
Then I have another new 5000 rows. And in total - 10000 rows. I want the new values of c_2 to be set in the same rows as c_1. i.e. to have
c_1 | c_2 | c_3 | c_4 | c_5
1 1 null null null
2 2 null null null
1 2 null null null
I thought it would be possible in monetdb because its a columnar db, but so far I didn't find how to do it.