오라클(SQL)서브쿼리(SUBQUERY)카운터(COUNT)
오라클(SQL)서브쿼리(SUBQUERY)카운터(COUNT) 1. 서브쿼리 기본 방법 -테이블로 만들어 사용하기 FROM COMMUNITY A, ( SELECT COMMUNITY_SEQ, COUNT(*) CNT FROM REPLY GROUP BY COMMUNITY_SEQ ) B 2. 카운트 -원하는 부분의 개수를 구한다 SELECT COMMUNITY_SEQ, COUNT(*) CNT FROM REPLY GROUP BY COMMUNITY_SEQ SELECT B.CNT, A.COMMUNITY_SEQ, A.COMMON_SEQ, A.COMMUNITY_CATEGORY_SEQ, A.COMMUNITY_TITLE, A.COMMUNITY_CONTENT, A.COMMUNITY_HIT, A.COMMUNITY_DEL_FLAG, ..
2021. 6. 25.