Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: "Ghost" colmumn with primary key



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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group