I have a question about the basic syntax of joining with derived tables.
Is this teh basic syntax that is used:
select *
from table1 a
inner join (select * from table2) as T1
on 1.ID = T1.ID
Will that work?
Join Stack Overflow to learn, share knowledge, and build your career.
I have a question about the basic syntax of joining with derived tables.
Is this teh basic syntax that is used:
select *
from table1 a
inner join (select * from table2) as T1
on 1.ID = T1.ID
Will that work?
you're asking about joining two subqueries? try:
select * from
(select * from table1) t1 inner join
(select * from table2) t2 on
t1.id = t2.id
In your posted query change on 1.ID = T1.ID
to on a.ID = T1.ID
and it should work fine but why do you even need that? You can directly join with table1
and no need of inline/derived table like
select *
from table1 a
inner join
table2 T1
on a.ID = T1.ID