一条SQL语句实现查询每个部门中年龄最大的员工信息

来源:互联网 发布:手机淘宝缓存怎么清理 编辑:程序博客网 时间:2024/04/29 15:52

select *  from   test1 t

    where   not   exists(select   1   from   test1   where   BranchId=t.BranchId and  Age> t.Age) 

 
原创粉丝点击