如果只是三条
select a.*,b.*,c.* from 
(
select * from tb where 时间='2004') a,(
select * from tb where 时间='2003') b,(
select * from tb where 时间='2002') c

解决方案 »

  1.   

    create table tab (時間 varchar(4),地點 varchar(10),人物 varchar(10))
    insert into tab
    select '2004', '北京',  '張三'
    union all select '2003', '深圳',  '李四'
    union all select '2002', '廣州',  '陳五'select * from tabdeclare @s varchar(1000)
    set @s=''
    select @s=@s+時間+'  '+地點+'  '+人物+'  '  from tabprint @s
      

  2.   

    用select a.*,b.*,c.* from 
    (
    select * from tb where 时间='2004') a,(
    select * from tb where 时间='2003') b,(
    select * from tb where 时间='2002') c
    可以
      

  3.   

    hdhai9451(※★山,快馬加鞭未下鞍...☆※) 
    写的具有通用性!!!
      

  4.   

    这个
    select a.*,b.*,c.* from 
    (
    select * from tb where 时间='2004') a,(
    select * from tb where 时间='2003') b,(
    select * from tb where 时间='2002') c
    可以