SELECT COALESCE(MAX(IDX) + 1, 1) FROM APPTB_NOTICE01
insert into apptb_notice01(idx, user_id, title, notice_content, writer, indate)
values(#{idx}, #{userId},#{title},#{noticeContent},#{writer}, NOW())
delete from apptb_notice01 where idx=#{idx}
update apptb_notice01 set title=#{title}, notice_content=#{noticeContent}
where idx=#{idx}