Use addition in database SQL -


can use addition in database?

for example: have data inside database integer. has value of 5.

is there query add 1 that? become 6.

please me i'm beginner.

this basic form of update statement:

update the_table   set the_column = the_column + 1 the_column = 5; 

note above update all rows the_colum has value 5. want change where clause different, e.g. selecting single row using condition on primary key column(s) of table.

check manual of dbms details, e.g.: http://www.postgresql.org/docs/current/static/dml-update.html


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -