select xx=null,yy from tb union all select xx=null,xx from tb 你那个null 是要显示出来的吗?
如果是要显示null 和空 那就用一楼的
create table AA ( xx varchar(3), yy varchar(3) )insert AA select 'dsf','hrg' insert AA select 'dfd','gfg' select identity(int,1,1) as id,* into #T from AA select xx,yy from (select NUll as xx,xx as yy,id from #T union select '' as xx,yy as yy,id from #T) T order by id
union all
select xx=null,xx from tb
你那个null 是要显示出来的吗?
(
xx varchar(3),
yy varchar(3)
)insert AA select 'dsf','hrg'
insert AA select 'dfd','gfg'
select identity(int,1,1) as id,* into #T from AA select xx,yy from
(select NUll as xx,xx as yy,id from #T
union
select '' as xx,yy as yy,id from #T) T
order by id