¡á[SQL 7_1_1] Total ·¹ÄÚµå ¼ö SELECT
SELECT COUNT(*) totcnt
FROM INSA_BBS
WHERE BBS_CODE = #bbsCode#;
¡á[SQL 7_1_2] °Ô½ÃÆÇ ½ÃÀÛ ÆäÀÌÁö¿Í CountperPage ÀÔ·Â
SELECT A.BBS_CODE bbsCode,
A.BBS_SEQ bbsSeq,
A.TITLE title,
A.CONTENT content,
A.ID id ,
A.PW pw ,
A.BBS_DATE bbsDate ,
A.HIT_CNT hitCnt ,
A.NAME name
FROM INSA_BBS A
WHERE 1=1____
AND A.BBS_CODE = #bbsCode#
ORDER BY BBS_SEQ DESC
LIMIT #firstIndex#, #pageUnit#;
¡á¿¹ 7_2_1 || ´ë¿ë·® DBÀÇ ÆäÀÌ¡ ó¸®1
SELECT BBS_SEQ, TITLE, NAME, WRITE_DATE, HIT_CNT
FROM BOARD
WHERE BBS_SEQ > :T_BBS_SEQ
AND ROWNUM <= 10
AND :SW = 'D'
UNION
SELECT /*+ INDEX_DESC(BOARD BOARD _PK) */
BBS_SEQ, TITLE, NAME, WRITE_DATE, HIT_CNT
FROM BOARD
WHERE BBS_SEQ < :F_BBS_SEQ
AND ROWNUM <= 10
AND :SW = 'U';
¡á¿¹ 7_2_2 || ´ë¿ë·® DBÀÇ ÆäÀÌ¡ ó¸®2
SELECT SABUN, NAME, HP, YEARS, SEX, CARRIER, POS_GBN_CODE, ADDR1||ADDR2, PUT_YN
FROM INSA
WHERE SABUN > :T_SA