c# - how to update a table values based on the table values in update statement? -
c# - how to update a table values based on the table values in update statement? -
i using mqsql db , connect db c#.now want update table field adding table field + current value.
i have done like,
first field using select statement , add together current value existing value.finally update table set new value table field...
so, there way in update
statement without using select
statement?
please guide me out of issue?
since same table, can update
straight , utilize where
clause field value want, instead of select
.
something this:
update tablename set somefield = somefield + 'some value' somefield = 'some other value';
note that: there no need field value first add together current value existing value , update, can however, straight using: set somefield = somefield + 'some value'
.
c# mysql sql database
Comments
Post a Comment