# Replace Database Table Records

**URL:** <https://forum.inductiveautomation.com/t/replace-database-table-records/24773>\
**Category:** Ignition\
**Tags:** database\
**Created:** [May 8, 2019, 12:46am UTC](https://forum.inductiveautomation.com/t/replace-database-table-records/24773 "2019-05-08T00:46:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpikerBrian](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@SpikerBrian](https://forum.inductiveautomation.com/u/SpikerBrian)\
**Post date:** [May 8, 2019, 12:46am UTC](https://forum.inductiveautomation.com/t/replace-database-table-records/24773/1 "2019-05-08T00:46:04Z")

</div>

Hello. I have two databases.  
There’s one Table which is intended to have an identical copy in both databases. DatabaseA contains the ‘master’ version of the Table.  
At the click of a button in an Ignition Client; I wish to delete the contents of the DatabaseB Table, then update it with all the records from the DatabaseA Table.  
Can this be achieved in a single step with one method (such as “Replace”)?  
Or do I need to pull the data from DatabaseA Table into a PowerTable, then delete the DatabaseB Table data, then insert the PowerTable data into the DatabaseB Table?

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [May 8, 2019, 3:10am UTC](https://forum.inductiveautomation.com/t/replace-database-table-records/24773/2 "2019-05-08T03:10:11Z")

</div>

What database is it ?

You can set up a synchronize tables outside of ignition with the database it self.

---

<div class="post-metadata">

**Author:** ![SpikerBrian](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@SpikerBrian](https://forum.inductiveautomation.com/u/SpikerBrian)\
**Post date:** [May 14, 2019, 6:50pm UTC](https://forum.inductiveautomation.com/t/replace-database-table-records/24773/3 "2019-05-14T18:50:34Z")

</div>

Hi craigb. The database is SQL server 2012. I’m also fairly new to databases.
