# MySQL course, flawed example

**URL:** <https://forum.codewithmosh.com/t/mysql-course-flawed-example/13191>\
**Category:** Uncategorized\
**Created:** [June 20, 2022, 9:35pm UTC](https://forum.codewithmosh.com/t/mysql-course-flawed-example/13191 "2022-06-20T21:35:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![epd](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@epd](https://forum.codewithmosh.com/u/epd)\
**Post date:** [June 20, 2022, 9:35pm UTC](https://forum.codewithmosh.com/t/mysql-course-flawed-example/13191/1 "2022-06-20T21:35:40Z")

</div>

Hi!

In the MySQL course I’ve found an example that doesn’t work, because the code is not correct, in my opinion. What Mosh used here is a subquery to provide a value to the main query, but the result of that subquery is a row, while it was supposed to be an ID.

![msedge_1LTevQOuzW](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/4/4086529768b16ab5ab9139605110718b729872fd.jpeg)

This is how I’ve wrote the same code.

![MySQLWorkbench_08nmzcMFmN](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/3/3c6e25b4f665b3232a68fef0075e1c93043cb419.jpeg)

Is my assumption correct, or am I missing something? Thank you for your attention.

---

<div class="post-metadata">

**Author:** ![northernocean](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@northernocean](https://forum.codewithmosh.com/u/northernocean)\
**Post date:** [July 3, 2022, 5:42pm UTC](https://forum.codewithmosh.com/t/mysql-course-flawed-example/13191/2 "2022-07-03T17:42:17Z")

</div>

I think you are correct 🙂
