tags:

views:

25

answers:

2

How can I perform a select operation on two fields and view them as a single field?

ex:

I have a customer table that holds the customers data, I want to select both last_name and first_name (two different fields) and want to view them like this, "last_name, first_name"

using the oracle command not using any language.

+5  A: 
SELECT last_name || ', ' || first_name full_name
  FROM tbl
dcp
+2  A: 

Try this -

SELECT '"' || last_name || ',' || first_name || '"' from table
Sachin Shanbhag