I am very beginner at SQL, so I am sorry if this question is primitive.
I just started following the tutorial of http://www.w3schools.com, so downloaded the "Northwind" database to try working on it, and using the pgAdmin 3 console to access the DB. I just tried simple command to choose one column of the table, but it gives the same following message with any column from any table
LINE 1: select City from Customers; ^ HINT: Perhaps you meant to reference the column "customers.City".
I would like to ask is there any thing wrong in my command? and how to fix it?
Thanks
When you imported this "Northwind" database column names were imported in CamelCase - your import must've added double quotes to column identifiers to create table
queries.
This is rather unfortunate, as this would cause that you'd have to quote them also in all queries, like:
select "City" from customers;
To remain sane I'd suggest you to rename all columns to lower case. This way it wouldn't matter what case you use, as Postgres converts all unquoted identifiers to lower case automatically. Then any of this would work:
select city from customers; select City from Customers; SELECT CITY FROM CUSTOMERS;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With