Hades
Hades

Reputation: 3936

sql order by clause

Ok so in my database I have,

1,2,3,4

But what I really want is,

2,1,4,3.

so how do I order a column against a predefined set of sequence of strings or values?

Upvotes: 1

Views: 267

Answers (1)

Bravax
Bravax

Reputation: 10493

Create a order by column, and order the results based on that.

Upvotes: 2

Related Questions