---
title: "Comment by Josef Richberg on \"Correlated Subqueries and Why You Need To Know Them\" | Hashnode"
description: "Hi Akshat, A correlated subquery would have an inner join like this: select * from table1 where exists (select 1 from table2 where table1.col1=table2.col1); you"
url: "https://hashnode.com/posts/correlated-subqueries-and-why-you-need-to-know-them/6509776b6e85b4e1a3475e73/comment/650cdb20939d972b99323bd3"
---

[Discussion](https://hashnode.com/posts/correlated-subqueries-and-why-you-need-to-know-them/6509776b6e85b4e1a3475e73)

Comment [Correlated Subqueries and Why You Need To Know Them](https://hashnode.com/posts/correlated-subqueries-and-why-you-need-to-know-them/6509776b6e85b4e1a3475e73)

[Josef Richberg](https://hashnode.com/@josefrichberg)

[Sep 22, 2023](https://hashnode.com/posts/correlated-subqueries-and-why-you-need-to-know-them/6509776b6e85b4e1a3475e73/comment/650cdb20939d972b99323bd3)

Hi Akshat, A correlated subquery would have an inner join like this:

select \* from table1 where exists (select 1 from table2 where table1.col1=table2.col1);

you are connecting via a join within the sub select.
