select top 10 * from 表a order by id desc
[union] all
select top 10 * from 表a order by CategoryID desc
[union] all
select top 10 * from 表a order by DepartmentID将[union]的[]去掉
[union] all
select top 10 * from 表a order by CategoryID desc
[union] all
select top 10 * from 表a order by DepartmentID将[union]的[]去掉
select top 10 * from 表a order by id desc
union all
select top 10 * from 表a order by CategoryID desc
union all
select top 10 * from 表a order by DepartmentID
(select top 10 * from 表a order by id desc) a
[union] all
select * from
(select top 10 * from 表a order by CategoryID desc) b
[union] all
select * from
(select top 10 * from 表a order by DepartmentID) c
from 表A
where ID in
(
select top 10 id
from 表A
order by id desc
union
select top 10 id
from 表A
order by CategoryID desc
union
select top 10 id
from 表A
order by DepartmentID desc
)
union all
select top 10 * from 表a order by CategoryID desc
union all
select top 10 * from 表a order by DepartmentID
union all
select top 10 * from a order by CategoryID desc
union all
select to 10 * from a order by DepartmentID
create table abc(id char(10),S01 int,S02 int,S03 int,S04 int,S05 int)
insert into abc select '1','32','2','4','23','23'
insert into abc select '2','58','6','4','23','23'
insert into abc select '3','63','2','41','23','23'
insert into abc select '4','31','2','9','23','84'
insert into abc select '5','11','45','40','23','23'
insert into abc select '6','39','22','14','80','23'
insert into abc select '7','52','21','43','23','23'
insert into abc select '40','31','12','89','23','84'
insert into abc select '80','11','20','46','23','23'
insert into abc select '696','39','29','45','80','23'
insert into abc select '7415','52','2220','4','23','23'
select * from abc
-----查询数据,排序
select top 10 s01 from abc order by s01
select top 10 s02 from abc order by s02
select top 10 s03 from abc order by s03----删除测试表
delete abc
有没有办法查处来了?
分不够可以在家
急啊,兄弟们