Ketul Parikh wrote:I have following SQL : UPDATE TABLE_NAME SET FIELD_NAME = FIELD_NAME -1 WHERE ANOTHER_FIELD_NAME= 311; I get success when i run this query directly from query browser. However, through my java program, when i create a preparedStatement and call its execute() method it throws following MySQL Syntax Exception. Other Details : MySQL Connector Jar - mysql-connector-java-5.1.15-bin.jar MySQL Version : 5.1 OS : CentOs 5.1
Tim McGuire wrote: can you post the code where you create the preparedStatement? and post the Syntax Exception? I think you forgot to paste it in there.