sql server - A table has two columns - how we can get the full_name into one column? -


i following sample data in sql table:-

first_name   last_name   concatenation(f_name,l_name) ------------------------------------------------------------- mohd         nazir       mohd,nazir 

i want see result

full_name = mohd nazir  

within same table

how about

alter table dbo.yourtablenamehere add fullname isnull(first_name, '') + ' ' + isnull(last_name, '') 

with computed column, have new column in table that'll contain concatenation of first , last name, separated space


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -