日期:2014-05-18  浏览次数:20651 次

假如有3个表,主要内容大体一样,可以把主要内容一起显示吗?
table1:
id
name
sex
fax
email(不同)
-----------
table2:
id
name
sex
fax
phone(不同)
-----------
table3:
id
name
sex
fax
address(不同)

select...   inner   join   以后,把   name   sex   fax   这三项显示到表格里面:可以用
do   while   not   rs.EOF
............

............
rs.MoveNext  
Loop
吗?
关键是字段用rs( "name ")   ...可以吗

------解决方案--------------------
select a.id,a.name,a.sex,a.email,b.phone , c.address from table1 a , table2 b , table3 c where .a.id = b.id and a.id = c.id
------解决方案--------------------
mark
------解决方案--------------------
SELECT
a.id,a.name,a.sex,a.email,b.phone,c.address
FROM table1 as a , table2 as b , table3 as c
WHERE a.id = b.id and a.id = c.id
------解决方案--------------------
select a.id,a.name,a.sex,a.email,b.phone , c.address from table1 as a inner join table2 as b on (a.id = b.id ) inner join table3 as c on(b.id = c.id)

do while not rs.EOF
............
rs( "name ") ....
rs( "sex ") .....
rs( "fax ") .....
............
rs.MoveNext
Loop