# Update matching records in database

**URL:** <https://community.easymorph.com/t/update-matching-records-in-database/1639>\
**Category:** General Q&A\
**Created:** [February 8, 2020, 10:05pm UTC](https://community.easymorph.com/t/update-matching-records-in-database/1639 "2020-02-08T22:05:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aatash](https://community.easymorph.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@aatash](https://community.easymorph.com/u/aatash)\
**Post date:** [February 8, 2020, 10:05pm UTC](https://community.easymorph.com/t/update-matching-records-in-database/1639/1 "2020-02-08T22:05:01Z")

</div>

Hello,

In my project, I am looking up data in postgres sql database table and create two branches - 1) insert a new record in the table if the record does not exist, and 2) update existing records with data.

I am able to insert new records, however, I am at a loss how to update existing data in the table.

Can someone help with this?

Thanks,  
Aatash

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [February 9, 2020, 11:55am UTC](https://community.easymorph.com/t/update-matching-records-in-database/1639/2 "2020-02-09T11:55:53Z")

</div>

Hi Aatash,

check out these topics:

> [@Updating a database table](https://community.easymorph.com/t/updating-a-database-table/304):
>
> I'm wondering if it is possible to update tables in a database using a transformation. My co-workers rely heavily on Excel and I have them copy data into spreadsheets and use various transformations to insert the data in the database and it works great. Now, I need them to take care of updating data here and there (like the status of an administration or date something closed) and right now they maintain that locally in a spreadsheet which I then manually change in the database. if I could crea…

> [@Updating database rows](https://community.easymorph.com/t/updating-database-rows/1493):
>
> The other element I have just thought about is that when updating database rows. In some forum posts, it has been mentioned to delete rows before adding them again. I am worried that I could have users accessing the database and suddenly when they are looking for data it has disappeared. Is there a better way?
