Reputation: 285
I am trying append the data the start of the particular row . I've written query for appending at the end of particular row.
update yourtable
set yourcol = case when yourcol is null then 'a,b,c'
else concat(yourcol, ' a,b,c') end
How i can write for appending values at start of the particular instead of inserting bottom of the table.
Upvotes: 0
Views: 28
Reputation: 24002
I think you want to prepend new data on column data.
update yourtable
set yourcol = case when yourcol is null then 'a,b,c'
else concat( 'a,b,c', ',', yourcol ) -- add a comma as well
end
Upvotes: 1