sql - Trying to add 1 to current field value with MySQL, but can't figure out what's wrong with my syntax -


i'm hoping can spot mistake in mysql query.

update 'databasename'.'tablename'     set fieldb = fieldb + 1   fielda = '2'; 

i'm trying add 1 current value of fieldb fielda i.e 2.

single-quotes strings.

update `databasename`.`tablename`  set fieldb = fieldb + 1  fielda = '2'; 

you can use backticks around database , tablenames; aren't strictly necessary though.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -