# Get primary key of updated row on runPrepUpdate

**URL:** <https://forum.inductiveautomation.com/t/get-primary-key-of-updated-row-on-runprepupdate/14216>\
**Category:** Ignition\
**Created:** [May 5, 2017, 6:44am UTC](https://forum.inductiveautomation.com/t/get-primary-key-of-updated-row-on-runprepupdate/14216 "2017-05-05T06:44:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [May 5, 2017, 6:44am UTC](https://forum.inductiveautomation.com/t/get-primary-key-of-updated-row-on-runprepupdate/14216/1 "2017-05-05T06:44:40Z")

</div>

Hi everyone,

I would like to verify that using getKey parameter on runPrepUpdate on an Update statement does not give back the primary key of updated row? If this is correct, is there any way to get the primary key?

Thank you.

---

<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 5, 2017, 12:10pm UTC](https://forum.inductiveautomation.com/t/get-primary-key-of-updated-row-on-runprepupdate/14216/2 "2017-05-05T12:10:23Z")

</div>

I don’t think so. Unlike an Insert statement, an Update statement can affect multiple rows, so there’s no generic facility for retrieving a primary key.

---

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [May 19, 2017, 2:51am UTC](https://forum.inductiveautomation.com/t/get-primary-key-of-updated-row-on-runprepupdate/14216/3 "2017-05-19T02:51:08Z")

</div>

thank you! makes sense.
