April 29th, 2004, 12:55 PM
combine columns in oracle sql
Is it possible to combine 2 columns within a table for a query? If so, what is the correct format of the command. For example: I have a table "Artist" with a column for the last name (artistlast) and a column for the firstname (artistfirst). I need to do a query that combines the two that would be known as artistname.
Thanking you in advance for your help.
April 29th, 2004, 01:04 PM
You can comabine two columns using concatenating operator || (double vertical bars), look at the following example:
SELECT firstname||'-'||lastname name,class,grade from students