日期:2014-05-17 浏览次数:20467 次
create table #t
(
A int,
B int,
C int
)
insert into #t
select 1,1,1 union all
select 1,2,0 union all
select 1,3,1 union all
select 1,4,0
select * from #t
union all
select * from #t where C = 0
order by B,C
create table #t
(
A int,
B int,
C int
)
insert into #t
select 1,1,1 union all
select 1,2,0 union all
select 1,3,1 union all
select 1,4,0
go
insert into #t
select * from #t where C =0
go
select * from #t
create table #t
(
A int,
B int,
C int
)
insert into #t
select 1,1,1 union all
select 1,2,0 union all
select 1,3,1 union all
select 1,4,0
go
insert into #t
select * from #t where C =0
go
select * from #t
ORDER BY b,c
/*
A B C
----------- ----------- -----------
1 &nbs