sqlinner-joinderived-table

Inner Joins with Derived Tables


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?


Solution

  • 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