3个数据字段的SELECT子句,显示为1个字段

时间:2014-05-07 08:26:04

标签: sql oracle

表名:LOCATION

//LOCATION
CITY      ROAD#        STREET#
-------------------------------
ANSON      41           16

以下查询:

SELECT (CITY,ROAD#,STREET#) AS "Location" FROM LOCATION;

希望获得以下输出:

Location
----------------
ANSON,41,16

不可能得到这样的东西吗?

1 个答案:

答案 0 :(得分:5)

SELECT CITY || ',' || ROAD# || ',' || STREET# AS "Location" FROM LOCATION;