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

Prepared statements and default values

From: Assad Jarrahian <jarraa(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Prepared statements and default values
Date: 2006-01-10 03:24:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
I have a preparedStatement with the following query
 "UPDATE usersettings SET gpsfrequency = ? , serverurl = ? where
username = ? ;";

In the db, the table userSettings has a default value specified for
gps_frequency .

So when I write code
if (client.getSettings().getField(Settings.GPS_FREQUENCY).compareTo(""))==0)
	<what goes here> //pick up the default value from the db.

<what goes here> .. I basically want to send something that lets the
db know to use the DEFAULT value. (its of type int0)

So what does go here?

any help would be much appreciated.



pgsql-jdbc by date

Next:From: David WallDate: 2006-01-10 03:30:37
Subject: Re: Prepared statements and default values
Previous:From: Jaime CasanovaDate: 2006-01-09 17:48:38
Subject: Fwd: [BUGS] BUG #2139: Problem when calling functions without any argument

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