---
title: "Discussion on \"How To Update Or Insert A Record In Spring Data JPA\" | Hashnode"
description: "Discussion on \"How To Update Or Insert A Record In Spring Data JPA\". Hot to check if a record exists and if it does, update, otherwise, insert the record in the database."
url: "https://hashnode.com/posts/how-to-update-or-insert-a-record-in-spring-data-jpa/62b0452082adbb66f3a0af45"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Update Or Insert A Record In Spring Data JPA](https://techwithmaddy.com/how-to-update-or-insert-a-record-in-spring-data-jpa?utm_source=hashnode&utm_medium=feed)

Hot to check if a record exists and if it does, update, otherwise, insert the record in the database.

Jun 20, 2022 · 2 min read · techwithmaddy.com  
Updated Mar 14, 2024  
Read the article

-   [#spring](https://hashnode.com/tag/spring)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#java](https://hashnode.com/tag/java)
-   [#mysql](https://hashnode.com/tag/mysql)

## Written by

[Maddy](https://hashnode.com/@Maddy25)

@Maddy25 · London, UK

  
[View profile](https://hashnode.com/@Maddy25)

Technical Writer @ Cloudflare

Software engineer turned technical writer.

## Responses

Markdown supported · ⌘↵ to post

[Julian Pedia](https://hashnode.com/@Julian017)

[Jan 29, 2024](https://hashnode.com/posts/how-to-update-or-insert-a-record-in-spring-data-jpa/62b0452082adbb66f3a0af45/comment/65b7eee246763921c548445b)

[news.julian.biz.id](https://news.julian.biz.id/)
