[Spring Boot] 게시판 기능 구현하기(3)
답글 등록 및 글 수정/삭제 Mapper UPDATE BBS SET STEP = STEP + 1 WHERE REF = (SELECT * FROM (SELECT REF WHERE SEQ = #{seq}) AS BB) AND STEP > (SELECT * FROM (SELECT STEP WHERE SEQ = #{seq}) AS BB2) INSERT INTO BBS (SEQ, ID, REF, STEP, DEPTH, TITLE, CONTENT, WDATE, DEL, READCOUNT) VALUES (NEXTVAL('SEQ_BBS'), #{id}, (SELECT REF FROM BBS AS BB3 WHERE SEQ = #{seq}), (SELECT STEP FROM BBS AS BB4 WHERE S..