Originally posted by sunita shaw:
So now I want to update Sale column by 5% so there is a query to do that.
Kindly let me know as I am getting error with this one:
UPDATE table Product SET Sale = ((Sale * 5)/100);
Remove the
word "table". This is really an SQL question, that doesn't have anything to do with
Java or JDBC. You'd better ask this to an SQL expert instead of on a Java forum.
Your SQL statement is going to set the value of column Sale to 5% of the original value, for all rows. Is that really what you want? Or did you want to increase the Sale values by 5% (i.e., set the value to 105% of the original value)?
UPDATE Product SET Sale = ((Sale * 105)/100);
[ December 01, 2005: Message edited by: Jesper de Jong ]