Re: "Ghost" colmumn with primary key

Поиск
Список
Период
Сортировка
От Bruno Baguette
Тема Re: "Ghost" colmumn with primary key
Дата
Msg-id e7o378$25e6$1@news.hub.org
обсуждение исходный текст
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: Idea for vacuuming
Следующее
От: "MG"
Дата:
Сообщение: RAID + PostgreSQL?