SELECT
LAST_NUMBER
FROM
USER_SEQUENCES
WHERE
SEQUENCE_NAME = '시퀀스명(대문자)';
<insert id="insertTest" parameterType="map">
<selectKey keyProperty="no" order="BEFORE" resultType="long">
select last_number from user_sequences where sequence_name = '시퀀스명'
</selectKey>
insert into board(
id,
title,
content,
regDte
) values (
#{no},
#{title},
#{content},
now()
)
</insert>
설명
[JPA] could not instance id generator (0) | 2021.07.22 |
---|---|
postgreSQL 쿼리문 타입 오류 (1) | 2021.06.06 |
댓글 영역