用户表中sex字段,1表示男,0表示女。要实现图一效果。
[img]http://www.iteye.com/upload/attachment/126550/502efa5c-fa57-3334-9e2a-3c8d705b243f.png[/img]
分别用decode和case when then else end实现,如图二。
[img]http://www.iteye.com/upload/attachment/126552/36140026-a11e-379a-9f3d-f79aa8b3f5a1.png[/img]
[img]http://www.iteye.com/upload/attachment/126550/502efa5c-fa57-3334-9e2a-3c8d705b243f.png[/img]
分别用decode和case when then else end实现,如图二。
[img]http://www.iteye.com/upload/attachment/126552/36140026-a11e-379a-9f3d-f79aa8b3f5a1.png[/img]