INSERT INTO TABLENAME (id, country, reference, status ) Values (21, ‘INDIA’, ‘0001’, ‘Pass’ )
here id and reference are unique.
how to insert 1000 records any loop concept in postgresql DB tool DBeaver, Please help ?
I am trying manually to insert the record individually which takes lot of time. So please help me in it ?
3
Answers
Assuming
reference
is incremental as well, below will work. You can tune the loopNo need for a loop, generate_series() can do this for you:
Better not to go with the loop. An alternative way is to import as CSV via COPY command.
This comes with its own pros & cons.