Oracle含有空值的行数据排序问题
2012-04-24 22:22
357 查看
可以使用 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
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
相关文章推荐
- Oracle分页查询排序数据重复问题
- SQL分页排序的实现与分页数据重复问题——以Oracle rownum为例
- oracle、sqlserver数据库排序空值null问题解决办法
- oracle、sqlserver数据库排序空值null问题解决办法
- oracle排序,出现页数不同数据却重复问题的原因及解决办法
- SQL分页排序的实现与分页数据重复问题——以Oracle rownum为例
- Oracle 数字与空值的排序问题
- 关于Oracle 大数据排序问题的优化之一
- Oracle 数字与空值的排序问题
- Oracle 数字与空值的排序问题
- oracle导出含有Clob大数据字段类型的问题
- 关于空值null的排序问题 mysql 和oracle
- SQL分页排序的实现与分页数据重复问题——以Oracle rownum为例
- oracle分页查询数据重复问题、分页排序陷阱
- oracle、sqlserver数据库排序空值null问题解决办法
- SQL分页排序的实现与分页数据重复问题——以Oracle rownum为例
- oracle、sqlserver数据库排序空值null问题解决办法
- NET连接不上Oracle数据时的问题。
- [疑]关于oracle导出数据时遇到的4031问题
- 解决从pl/sql查看oracle的number(19)类型数据为科学计数法的问题