首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

7张表如何同时比对其中的相同内容

2012-03-02 
7张表怎么同时比对其中的相同内容7张表怎么同时比对其中的相同内容select * from table1,table2where tabl

7张表怎么同时比对其中的相同内容
7张表怎么同时比对其中的相同内容 
select * from table1,table2
where table1.sfzh=table2.sfzh;
如果有7张表怎么写。

[解决办法]

SQL code
select * from table1 inner join table2 on table1.sfzh=table2.sfzh                     inner join table3 on table1.sfzh=table3.sfzh                     inner join table4 on table1.sfzh=table4.sfzh                     inner join table5 on table1.sfzh=table5.sfzh                     inner join table6 on table1.sfzh=table6.sfzh                     inner join table7 on table1.sfzh=table7.sfzh 

热点排行