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.
update `databasename`.`tablename` set fieldb = fieldb + 1 fielda = '2';
you can use backticks around database , tablenames; aren't strictly necessary though.
Comments
Post a Comment