Skip to content Skip to sidebar Skip to footer

Postgresql Subquery With Syntax Error Gives A Valid Result

What is happening here? I got two tables, test1 and test2: create table test1 (id1 int4 primary key); create table test2 (id2 int4 primary key); As expected, this query: select id

Solution 1:

Columns from outer select are visible in sub-select.

Your query is equivalent to:

select * 
from test1 
where test1.id1 in (select test1.id1 from test2);

Post a Comment for "Postgresql Subquery With Syntax Error Gives A Valid Result"