0

I want to update a data in my row in the database but it will only add it to the existing data where this existing data is a integer.. example i have a existing data of 100 and my update data is 200.. so the result should be 300... please give me a sample code for this query update in jdbc... thanks

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Ezzaral
0
update [tableName] set [valueFieldName] = [valueFieldName]+[amount] where [row criteria expression]

Use Statement.executeUpdate() or PreparedStatement.executeUpdate() to execute the update.

Edited by Ezzaral: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.