Skip to content

Conversation

@jxxxxxn
Copy link

@jxxxxxn jxxxxxn commented Nov 13, 2025

  • 5단계 - 데이터베이스 적용하기
  • 6단계 - 데이터 조회하기
  • 7단계 - 데이터 추가/삭제하기

감사합니다.

Copy link

@juanxiu juanxiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~!


String sql="INSERT INTO reservation(name, date, time) VALUES (?,?,?)";
jdbcTemplate.update(sql,reservation.getName(),reservation.getDate(),reservation.getTime());
String getIdSql="SELECT LAST_INSERT_ID()"; //해당 구문 사용 위해 application.properties에 MODE=MySQL 추가함
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDBC 에서 자동 생성된 키 값을 조회하기 위해 어떤 방법이 있을까요? keyholder 개념을 활용해보는 것도 좋아 보입니다. 이 글을 참고해보세요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants