Question

I have got a the following query

    select tb2.customer_no, tb2.last_name, tb2.first_name
    from ccare.customer tb2
    where tb2.customer_no = '1000647'

which outputs

             customer_no    First name      Last name
             1000647          George              Roberts

How can I combine the First name and last name to appear in one column. The desired output would be

             customer_no       Name     
             100064        George Roberts
Was it helpful?

Solution

Pretty simple. This should do it.

select tb2.customer_no, tb2.last_name || ' ' || tb2.first_name name
from ccare.customer tb2
where tb2.customer_no = '1000647'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top