例子:
----------------------------------------------
P.No | Relation | Name
----------------------------------------------
2 | Self | Kumar
----------------------------------------------
1 | Husband | Selvam
----------------------------------------------
2 | Son | Manoj
----------------------------------------------
1 | Self | Gandhi
----------------------------------------------
我应如何根据列值偏好对行进行排序?
我想要类似于这样的结果:
Order By P.No &
( Self 1 st preference ,
Husband 2nd preference,
son 3rd Preference )
我期望看到以下输出:
----------------------------------------------
P.No | Relation | Name
----------------------------------------------
1 | Self | Gandhi
----------------------------------------------
1 | Husband | Selvam
----------------------------------------------
2 | Self | Kumar
----------------------------------------------
2 | Son | Manoj
----------------------------------------------
请帮助我解决我的问题。谢谢。