Re: Query about SQL in PostgreSQL

From: Richard Huxton <dev(at)archonet(dot)com>
To: Muhammad Nadeem Ashraf <nadeem_engg(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Query about SQL in PostgreSQL
Date: 2005-04-19 10:58:29
Message-ID: 4264E455.8040406@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Muhammad Nadeem Ashraf wrote:
> Hi,
> I am new user of PostGreSQL 8.0.1. While using it i faced following
> issue. As SQL is Case insensetive Language So the Uper or Lower cases
> are not significant. But while using the database there is problem.
> If i Create new Table with name (tblstudent) then upon SQL queries it is
> fine to use Select * from tblstudent. However i face probel if i give
> the name of table in Capital letters i.e. if the name is (tblStudent)
> then upon using Select * from tblStudent, following error is appeard:
> ERROR: relation "tblst" does not exist
>
> And if i use the query Select * from "tblStudent" then it works fine.

If you quote your table-names when you create them you should always
quote them when you use them.

If you don't quote your table-names when you create them, there is no
need to quote them when you use them.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-19 11:11:53 Re: can a function return a virtual table?
Previous Message Thomas Kellerer 2005-04-19 10:35:52 Re: Query about SQL in PostgreSQL