i have table like below
sno name code id
1 asvr 123 3
2 ramu 789 7
3 raju 456 3
4 praveen 876 3
i want o/p like when id=3 add character "r" to end of code ..like below ...
sno name code id
1 asvr 123r 3
2 ramu 789 7
3 raju 456r 3
4 praveen 876r 3
Loading
VulpesPosted Feb 26, 2014, 5:07 AM
shashi kiran JillepallyPosted Feb 26, 2014, 6:32 AM
select ColName+'r' from TableName
if you want change entire column values permanently use this query
update TableName set Code=Code+'r'
or with where conditon
update TableName Code=Code+'r' where Id=3
JAYRAMPosted Feb 26, 2014, 3:08 AM
Kiran Kumar TalikotiPosted Feb 26, 2014, 2:48 AM
Try this query it will work as you expected
select sino,name,code+'r' as code ,id from TableName where id=3
Hope this helps you