Re: "Ghost" colmumn with primary key

From: Bruno Baguette <pgsql-ml(at)baguette(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: "Ghost" colmumn with primary key
Date: 2006-06-26 07:43:43
Message-ID: e7o378$25e6$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

chrisek(at)poczta(dot)neostrada(dot)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(at)baguette(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-06-26 09:31:32 Re: Return the primary key of a newly inserted row?
Previous Message MG 2006-06-26 07:36:52 RAID + PostgreSQL?