A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
performing addition to a integer value using sql
Joined: Sep 27, 2002
Apr 16, 2005 02:06:00
I have an Int column in a table and I need to be able to add a number to the current value in the table. i.e. current value + value = new value
eg. 5 + 10 = 15
How do i this using sql.I have tried the following but it does not work
UPDATE Locations SET hitCount = hitCount + 1 WHERE locationId = 2;
Joined: Aug 13, 2004
Apr 16, 2005 08:08:00
do you get any error message ?
Gravitation cannot be held responsible for people falling in love ~
I agree. Here's the link:
subject: performing addition to a integer value using sql
Synchronizing Stateless Session Bean's member variable
DI and final filelds
MySQL Date field , how to assign current date as default value ?
problem in cookie
How I run my web application on browser after deploying it on Websphere Application Server 6
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013