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

Re: Query about SQL in PostgreSQL

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Query about SQL in PostgreSQL
Date: 2005-04-19 10:35:52
Message-ID: d42mmf$tnl$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

On 19.04.2005 11:48 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.

This is how SQL is defined in the ANSI standard. If you use double quotes around
your object names, then it's case sensitiv. If you omit the double quotes it's
not. General rule: do not use double quotes at all, and your fine (this is true
for other DBMS like Oracle and Firebird as well)


In response to

pgsql-sql by date

Next:From: Richard HuxtonDate: 2005-04-19 10:58:29
Subject: Re: Query about SQL in PostgreSQL
Previous:From: Sean DavisDate: 2005-04-19 10:16:01
Subject: Re: Query about SQL in PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group