Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to update a column

Author  Topic 

mavericky
Posting Yak Master

117 Posts

Posted - 2012-03-01 : 20:41:56
Hi I have this data:

ID Name
1 abc
2 def

I want Name column to be like this:
ID Name
1 1abc
2 2def
How can I do this?
Thanks,
Mavericky

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-03-01 : 20:50:32
[code]
update yourtable
set Name = convert(varchar(10), ID) + Name
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -