0
我有這個疑問,我需要3列不是1列3行合併MySQL的語句轉換成3列不是3行
select count(*) from p_a a
inner join p_aa aa on a.ID = aa.AlbumID
where a.ID = '04c9ed6e-1fb2-4d49-b5f6-a9d227ad7e7d'
union
select count(*) from _ph p
inner join pa a on a.ID = p.AlbumID
where a.ID = '04c9ed6e-1fb2-4d49-b5f6-a9d227ad7e7d'
union
Select LastUpdate from tsimestamp ats where ats.AlbumID = '04c9ed6e-1fb2-4d49-b5f6-a9d227ad7e7d';
謝謝,我忘記了逗號。謝謝!! – user516883 2012-03-10 06:44:54