Suppose, Table A has column "Name"
Name
====
aaa
bbb
ccc
Now , I want to the table like this:-
Name
====
naaa
nbbb
nccc
It is very silly but I am asking what is the simplest string function to do this?
Use string concatenation. You can also use the CONCAT() function in SQL Server 2012 onward
select
'n' + [Name]
From YourTable
select
CONCAT('n',[Name])
From YourTable
As John pointed out, you may want to update your table...
update YourTable
set [Name] = 'n' + [Name]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With