mysql last insert id

mysql autoincreament 일 때 다음에 사용할 index 가져오기

<insert id="insert" parameterType="DeviceErrorLog">
        INSERT INTO <include refid="tableName"/>
        (
            <include refid="baseColumns"/>
        )
        VALUES
        (
            <include refid="baseValues"/>
        )
        <selectKey resultType="_int" keyProperty="id" order="AFTER" >  
            SELECT LAST_INSERT_ID()
        </selectKey> 
    </insert>

댓글

이 블로그의 인기 게시물

HP 서버 OS 설치시 HDD를 잡지 못하는 문제

python-gdal 설치

Mysql JOIN 사용시 컬럼이름 중복해결