I deleted every table inside the second_database but still, it is not deleted.
It seems that you are connected (\c
) to the second_database
using another terminal.
Close all your other terminals and try again.
thanks, i fixed that,
can u tell me how can I edit a row in PostgreSQL.
Like i have to change daise to daisy in here
You want to follow this template:
UPDATE table_name SET column_name='value' WHERE column_name='sensible_value';
What would you change the placeholders to?
What would you place instead of the sensible_value
and why?
value to daise and sensible value to daisy.
Think again!
WHERE adds a condition to the before written command.
Imagine the database has thousands of characters where there are many of them called “daise”.
Try to add another character named ‘daise’, run the command and see what happens. You can remove that record later.
UPDATE table_name SET column_name=‘fixed’ WHERE column_name=‘wrong!’;
The value you want to change is found in one of the columns in the table. You want to SET that wrong value to the correct one in that same column.
Clear as mud?
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.