Home > database >  SQL statement type varchar (MAX) of the value of the field to realize the cumulative effect of spell
SQL statement type varchar (MAX) of the value of the field to realize the cumulative effect of spell

Time:01-15

For example a Corp., staffname field, type is varchar (MAX), how to update Corp set staffname... Where type='Month', this statement to realize the value of the field data can be added together to spelling, like int data type staffnum field values staffnum +=1,

CodePudding user response:

Very simple, direct string concatenation can ah,

The update Corp set staffname=staffname + 'your New string' where type='Month'

I understand the wrong?
  • Related