# increase int column via UPDATE, without SELECT

**URL:** <https://forums.percona.com/t/increase-int-column-via-update-without-select/440>\
**Category:** Other MySQL® Questions\
**Created:** [September 7, 2007, 3:25pm UTC](https://forums.percona.com/t/increase-int-column-via-update-without-select/440 "2007-09-07T15:25:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinjohn](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@kevinjohn](https://forums.percona.com/u/kevinjohn)\
**Post date:** [September 7, 2007, 3:25pm UTC](https://forums.percona.com/t/increase-int-column-via-update-without-select/440/1 "2007-09-07T15:25:57Z")

</div>

I’m a tad worried that this is a simple SQL question, and not a MySQL performance question, so if thats the case, my apologies.

I’m looking to increase (or decrease) the value of an int field by a set amount (usually 1), without calling a SELECT statement first.

Right now, i am doing a SELECT to find the value, then doing an UPDATE with the new value.

I hope there is a way of just doing an UPDATE with a function, but i have yet to find it (and my bad english is slowing the search).

Thanks

Kev

P.S. While not a performace quesstion iteself, it would save me 1 DB call everytime i want to do this, which happens alot on my system.

---

<div class="post-metadata">

**Author:** ![kevinjohn](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@kevinjohn](https://forums.percona.com/u/kevinjohn)\
**Post date:** [September 7, 2007, 3:45pm UTC](https://forums.percona.com/t/increase-int-column-via-update-without-select/440/2 "2007-09-07T15:45:57Z")

</div>

_sigh_

Apparently the phrase i should be searing for is INCREMENT and not INCREASE.

That got me the solution first link on google.

for those that might be as stupid as me it’s:

update yourtablename set x = x + 1;

I will try and not ask as silly questions next time, i’m new to MySQL so i apologise in advance.
