Re: Problem using PostgreSQL 9.0.4 with Java - Mailing list pgsql-general

From John R Pierce
Subject Re: Problem using PostgreSQL 9.0.4 with Java
Date
Msg-id 4E67E3CF.2010908@hogranch.com
Whole thread Raw
In response to Problem using PostgreSQL 9.0.4 with Java  (Arun Nadar <arun_rt@rocketmail.com>)
List pgsql-general
On 09/07/11 1:45 PM, Arun Nadar wrote:
>
> but it work by putting " ",  like this SELECT "Id", "Name" FROM
> "Student" ORDER BY "Id";
>
> in java String,  inside of double inverted commas another is does not
> possible.


String sql="SELECT \"Id\", \"Name\" FROM \"Student\" ORDER BY \"Id\"";

Alternately, create your table with all lower case names, and you won't
have this problem.

     alter table "Student" rename to student;
     alter table student rename column "Id" to id;
     alter table student rename column "Name" to name;



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Problem using PostgreSQL 9.0.4 with Java
Next
From: Chris Redekop
Date:
Subject: Re: Demoting master to slave without an rsync...is it safe?