db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Updating several consecutive fields in a record
Date Wed, 06 Jul 2016 22:32:15 GMT
> psUpdate = conn.prepareStatement("UPDATE xxxx SET PROFIT_LOSS = ? WHERE

>
> Now, I wish to update seven consecutive fields in the latest derby record

You can list multiple columns in the UPDATE statement:

     UPDATE my-table SET col-1=?, col-2=?, col-3=? WHERE ...

And then use multiple "setInt", "setString", etc. statements
to associate the various column values to be used for the
placeholders.

bryan



Mime
View raw message