34,590
社区成员
发帖
与我相关
我的任务
分享
select
min(XSL) as minXSL,min(LR),max(XSL) as maxXSL,max(LR) as maxLR
from
tb
select min(XSL) as minXSL, min(LR) minLR , max(XSL) maxXSL , max(LR) maxLR from tb_name
select min(XSL) as minXSL,min(LR),max(XSL) as maxXSL,max(LR) as maxLR
from tb
create table tb(ID int,XSL int,LR int)
insert into tb select 1, 44, 72
insert into tb select 2, 90, 24
insert into tb select 3, 34, 24
insert into tb select 4, 98, 34
go
select min(XSL), max(LR), max(XSL), max(LR) from tb
go
drop table tb
/*
----------- ----------- ----------- -----------
34 24 98 72
(1 行受影响)
*/
select min(XSL), min(LR), max(XSL), min(LR) from tb