개발을 하다보면 가끔 insert 후 키값을 받아와야할때가 있다. insert 후 생성된 키를 다른 테이블에 외래키로 넣는다던지.. 그럴때는 selectKey 태그를 이용하여 키값을 리턴받으면 된다. SELECT MAX(product_no) FROM tb_test WHERE product_no = #{product_no} INSERT INTO tb_test ( product_nm, product_no, reg_date, reg_id, mod_date, mod_id ) VALUES ( #{product_nm}, #{product_no}, -- selectKey태그에서 keyProperty 변수명을 파라미터로 사용가능 now(), #{reg_id}, now(), #{mod_id} ); selectKey 태그..