# Unique primary key

**URL:** <https://community.thunkable.com/t/unique-primary-key/1670922>\
**Category:** Questions about Thunkable X\
**Created:** [January 12, 2022, 7:30pm UTC](https://community.thunkable.com/t/unique-primary-key/1670922 "2022-01-12T19:30:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiasp](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@aiasp](https://community.thunkable.com/u/aiasp)\
**Post date:** [January 12, 2022, 7:30pm UTC](https://community.thunkable.com/t/unique-primary-key/1670922/1 "2022-01-12T19:30:25Z")

</div>

Hello, how to avoid that one new record is created with the same primary key of another one ?

thanks  
Guido

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [January 12, 2022, 7:40pm UTC](https://community.thunkable.com/t/unique-primary-key/1670922/2 "2022-01-12T19:40:00Z")

</div>

When creating a new key check to see if it already exists.

If it doesn’t then great, if it does then generate a new key and check again.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 12, 2022, 8:21pm UTC](https://community.thunkable.com/t/unique-primary-key/1670922/3 "2022-01-12T20:21:57Z")

</div>

Use the Row ID as your key and it will always be unique.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 12, 2022, 8:22pm UTC](https://community.thunkable.com/t/unique-primary-key/1670922/4 "2022-04-12T20:22:58Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
