Обсуждение: Re: "Ghost" colmumn with primary key

Поиск
Список
Период
Сортировка

Re: "Ghost" colmumn with primary key

От
Bruno Baguette
Дата:
chrisek@poczta.neostrada.pl a écrit :
> Hello,
> I have a table 'customers', with 2 records:
>
> SELECT * FROM customers;
>  customerID |  customerName
> ------------------+-------------------------
>   myFriend   | myFriend's Name
>       test       | testing user
> (2 rows)
>
> but when I'm asking about customerID column, I get the answer:
>
> SELECT customerID FROM customers;
> ERROR:  column "customerid" does not exist
>
> What happens? I'm using PostgreSQL 8.1.3

Hello,

You have to use double-quotes since your column contains some uppercase
characters. Try this :

SELECT "customerID" FROM customers;

Hope this helps,

--
Bruno BAGUETTE - pgsql-ml@baguette.net

"Nous n'avons pas à garantir la sécurité des
  produits alimentaires génétiquement modifiés (OGM).
  Notre intérêt est d'en vendre le plus possible."

  Propos de Monsanto, in le Monde Diplomatique, Décembre 98.

Re: "Ghost" colmumn with primary key

От
"chris997"
Дата:
Yes, you were right, adding "" solved the problem
many thanx!