# Creating relationships -foreign Key issue?

**URL:** <https://forum.codewithmosh.com/t/creating-relationships-foreign-key-issue/12093>\
**Category:** SQL\
**Created:** [April 25, 2022, 2:00am UTC](https://forum.codewithmosh.com/t/creating-relationships-foreign-key-issue/12093 "2022-04-25T02:00:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigi](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gigi](https://forum.codewithmosh.com/u/gigi)\
**Post date:** [April 25, 2022, 2:00am UTC](https://forum.codewithmosh.com/t/creating-relationships-foreign-key-issue/12093/1 "2022-04-25T02:00:46Z")

</div>

![Screen Shot 2022-04-24 at 7.52.02 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/e/e104f4ac0776e92e17cb64a0641bfa7697fe9884.jpeg)  
Hi everyone,

what is the issue here? I can’t create an orders table under sql\_store2. I am doing what exactly Mosh is showing in the video. Which step is not correct? Please help!

Thanks!  
Gigi

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [April 25, 2022, 4:38am UTC](https://forum.codewithmosh.com/t/creating-relationships-foreign-key-issue/12093/2 "2022-04-25T04:38:42Z")

</div>

You called the key field of the customers table customer **s** \_id while you are referencing it as customer\_id.

---

<div class="post-metadata">

**Author:** ![gigi](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gigi](https://forum.codewithmosh.com/u/gigi)\
**Post date:** [April 27, 2022, 1:35am UTC](https://forum.codewithmosh.com/t/creating-relationships-foreign-key-issue/12093/3 "2022-04-27T01:35:44Z")

</div>

ahhh…good eye! Thanks, Sam! my order table is created 😀
