具有多个连接的SQL查询

时间:2013-11-13 16:17:30

标签: jquery mysql sql join

是否可以在from之后多次运行内连接? 类似的东西:

select *  from (select * from A join B) T1 join (select * from C join D) T2

这是我的查询,我收到错误:

select * 
from ((select mf_user_email from mt_install where mf_token='iPfIefqc7IvEwq1QzoRlwnud4mOP3ATW') T1
inner join mt_interest) T2 
inner join 
(select * from mt_event_type inner join mt_event_type_name where event_type_name.mf_event_lang='he') T3 

我收到此错误:

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'T2 join select * from mt_event_type inner join mt_event_type_name where mt_event' at line 1

1 个答案:

答案 0 :(得分:0)

select * 
from (select mf_user_email 
      from mt_install 
      where mf_token='iPfIefqc7IvEwq1QzoRlwnud4mOP3ATW') T1
inner join mt_interest T2 
inner join 
     (select * 
      from mt_event_type 
      inner join mt_event_type_name 
      where event_type_name.mf_event_lang='he') T3