목록임시 (2)
투케이2K
[개발 환경 설정] 개발 툴 : SSMS 개발 언어 : MSSQL [소스 코드] /* [요약 설명] 1. WITH : MSSQL 에서 임시 가상 테이블을 생성할 수 있습니다 2. UNION ALL : 데이터를 병합할 때 사용합니다 */ /* [임시 가상 테이블 만들기 실시] */ WITH SAMPLE_USER AS ( SELECT '홍길동' AS 이름, 80 AS 국어, 85 AS 영어, 90 AS 수학 FROM (SELECT '1' AS DUAL) A UNION ALL SELECT '임꺾정' AS 이름, 70 AS 국어, 75 AS 영어, 85 AS 수학 FROM (SELECT '1' AS DUAL) A ) /* [쿼리문] : 일반 조회 쿼리문 */ SELECT * -- FROM SAMPLE_U..
[개발 환경 설정] 개발 툴 : Toad 개발 언어 : Oracle [소스 코드] /* [임시 가상 테이블 만들기 실시] */ WITH SAMPLE_USER AS ( SELECT 1 AS IDX, '대조영' AS NAME, 27 AS AGE, 'M' AS SEX, '발해' AS DEPT FROM DUAL UNION ALL SELECT 2 AS IDX, '정혜공주' AS NAME, 17 AS AGE, 'G' AS SEX, '발해' AS DEPT FROM DUAL UNION ALL SELECT 3 AS IDX, '왕건' AS NAME, 25 AS AGE, 'M' AS SEX, '고려' AS DEPT FROM DUAL UNION ALL SELECT 4 AS IDX, '정순왕후' AS NAME, 51 A..