oracle中如何给有空值的数据排序
可以使用 nulls first 和 nulls last 把空值行排到前面和后面,例:
1 select PatientName,BedNo
2 from T_PatientInHospital
3 where DepartmentCode='0608'
4 order by to_number(BedNo) nulls first
1 select PatientName,BedNo
2 from T_PatientInHospital
3 where DepartmentCode='0608'
4 order by to_number(BedNo) nulls last
 
                     
                    
                 
                    
                

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号