I have a table that looks like this:
id, integer, Primary Key, not null name, character varying created, timestamp without timezone, not null, default: now()
I want to generate n lines with a NULL field name.
I know what I can do:
INSERT INTO employee (name) VALUES (NULL), (NULL)...
But I would rather do something like this:
INSERT INTO employee (name) SELECT NULL FROM dummy_table_with_n_rows
And I could choose n.
source share