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
有帮助吗?

解决方案

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'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top