[resolved] insert into postgres table only some columns
fails with "null value in column "column_name" violates not-null constraint"
Hello,
I want to insert two values in a postgre table with more than two columns.
The primary key has a sequence. So will be filled automaticly.
If I try. I get the error message above.
What ist the correct approach for this task?
Thank you for your help!
Christian
Hello Shong,
you brought me on the right path. Thank you very much!
It was not an error of my job. It was an error of my Postgres DB.
The column name "column_name" was so strange that I was not sensitiv enough.
ALTER TABLE <table_name> ALTER COLUMN column_name DROP NOT NULL;
ALTER SEQUENCE <sequence_name> restart with 251;
Best regards,
Christian