# Copy data from one table to another

**URL:** <https://forum.inductiveautomation.com/t/copy-data-from-one-table-to-another/11749>\
**Category:** Archived Topics\
**Created:** [May 30, 2016, 9:30pm UTC](https://forum.inductiveautomation.com/t/copy-data-from-one-table-to-another/11749 "2016-05-30T21:30:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [May 30, 2016, 9:30pm UTC](https://forum.inductiveautomation.com/t/copy-data-from-one-table-to-another/11749/1 "2016-05-30T21:30:09Z")

</div>

I have an existing application where I have a MySQL table recording CIP data from 10 unique CIP systems using transaction groups to insert data into the table called CipRunData

Each of the 10 CIP systems has a unique identifier in a column SystemID, where CIP# 1 ( SystemID=0) CIP#10 ( SystemID = 9)

Due to the shear size of the CipRunData table, I want to break out the one global table and create 10 unique tables called CipRunData0 to CipRunData9 with the identical structure as CipRunData

I need to preserve any previously recorded CIP run data , so what I I really need to do in plain English is:

Copy all data from: CipRunData WHERE System ID = 0 into CipRunData0  
Copy all data from: CipRunData WHERE System ID = 1 into CipRunData1  
.  
.  
Copy all data from: CipRunData WHERE System ID = 9 into CipRunData9.

I am an SQL novice, so is there a way to do this from within MySQL WorkBench?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 31, 2016, 12:02am UTC](https://forum.inductiveautomation.com/t/copy-data-from-one-table-to-another/11749/2 "2016-05-31T00:02:10Z")

</div>

You’ll want to use the [Create Table … Select …](http://dev.mysql.com/doc/refman/5.6/en/create-table-select.html) syntax to create and populate each table in one go.
