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

oracle中如何给有空值的数据排序
  
    
1 select PatientName,BedNo
2 from T_PatientInHospital
3 where DepartmentCode = ' 0608 '
4 order by to_number(BedNo) nulls last

oracle中如何给有空值的数据排序

你可能感兴趣的:(oracle)