1/1 페이지 열람 중
테이블 조인 : UNION ALL을 ORDER BY와 같이 사용할 때 원하는 값 얻기 select top 5 * from ( select SEQ, ID, NAME, INPUTDATE from 테이블1 UNION ALL select SEQ, ID, NAME, INPUTDATE from 테이블2 UNION ALL select SEQ, ID, NAME, INPUTDATE from 테이블3 ) as unionResult order by INPUTDATE desc 참고자료 http://www.sqlteam.com/forums/topic…
select top 5 '[보도자료]' AS type, newsNo, newsUsed from boardA where newsUsed = 'y' order by newsNo desc UNION ALL select top 5 '[공지사항]' AS type, newsNo, newsUsed from boardB where newsUsed = 'y' order by newsNo desc UNION ALL select top 5 '[연재기사]' AS type, newsN…