select a.date as adate,b.date as bdate,c.date as cdate,d.date as ddate from a inner join b on b.p_id=a.p_id inner join c on c.p_id=a.p_id inner join d on d.p_id=a.p_id where 1
或者: select a.date as adate,b.date as bdate,c.date as cdate,d.date as ddate from a inner join b on b.p_id=a.p_id inner join c on c.p_id=a.p_id inner join d on d.p_id=a.p_id where 1 group by adate,bdate,cdate,ddata 后面的 group by 楼主根据实际需要加。如果没有必要,可以不加
select a.date,b.date,c.date,d.date from a,b,c,d where a.id=b.id and b.id=c.id and c.id=d.id select a.date,b.date,c.date,d.date from ((a inner join b using id) inner join c using id) inner join d using id
select a.date as adate,b.date as bdate,c.date as cdate,d.date as ddate from a inner join b on b.p_id=a.p_id inner join c on c.p_id=a.p_id inner join d on d.p_id=a.p_id where 1 group by adate,bdate,cdate,ddata
后面的 group by 楼主根据实际需要加。如果没有必要,可以不加
from a,b,c,d
where a.id=b.id and b.id=c.id and c.id=d.id
select a.date,b.date,c.date,d.date
from ((a inner join b using id)
inner join c using id)
inner join d using id