Inner Joins with Derived Tables

Neil Keicher picture Neil Keicher · Oct 31, 2014 · Viewed 10.8k times · Source

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?

Answer

Beth picture Beth · Oct 31, 2014

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