SQL
SQL 한줄에 정보 표시하기 예제
안드로이
2017. 1. 4. 15:40
SQL 한줄에 정보 표시하기 예제
SELECT
A.ATTR1, A.ATTR2
FROM
(
SELECT
NVL( (SELECT 'AAA' FROM DUAL) ,0) AS ATTR1
,NVL( (SELECT 'BBB' FROM DUAL) ,0) AS ATTR2
FROM DUAL
) A
;
또는
SELECT
(SELECT 'AAA' FROM DUAL) AS ATTR1
,(SELECT 'BBB' FROM DUAL) AS ATTR2
FROM DUAL
;
[결과]
----------------------------
ATTR1 ATTR2
AAA BBB
----------------------------