dimanche 21 décembre 2014

mysql sorting by two columns conditionally


Column a has category ids.Column b has set orders. Suppose category ids are

80

81

82

83

84

85

86

87

88

89

90.

Column b has null

null

null

2

null

4

null

null

null

null.

Desired output is

90

83

89

88

85

87

86

84

82

81

80.

Please help how to write the order by.





Aucun commentaire:

Enregistrer un commentaire