I am creating an airbnb database datamart. I am using postgresql in the terminal. During the creation I would generate data via chatgpt to create 20 rows for each table. however, when creating the table I was unable to add some columns as foreign keys, as the original tables had not been created yet. After creating the new column in my table, I need to add new information to the attributes. How can I go about doing this?
Thanks
Im trying to insert information into the new attribute column that I added (guestinfo to profile table) but doing the following sql statement:
INSERT INTO profile (guestinfo)
VALUES
(5764);
…
It gives the following error:
ERROR: null value in column “userid” of relation “profile” violates not-null constraint
DETAIL: Failing row contains (null, null, null, null, null, null, null, null, null, null, null, null, null, 4785).
I want to be able to add information to the new attribute
Kirst is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.