Sql query to update a column without overwriting the existing data.

How do we update a column in SQL database without overwriting the existing data?
Who is Participating?
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
i didbt understand, you mean to update a paticular column with entirely new value in that case try this

update urTable
set urColumn = 'newValue'
 where somePrimarykey = 'someUniqueValue'

if you want to append to the exisitng one

update urTable
set urColumn = urColumn +  'newValue'
 where somePrimarykey = 'someUniqueValue'
update table1
set field1 = 'whatever' where field1 is null

only writes into blank field1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.