mysql - Manual order in SQL -


If I have a table of things ...

  ThingName | Thing Category ------------------------- Item 1 | Cat 1 chees 2 Cat 2 thing 3 Cat 3   

I first have them type in cat2 , then cat1 , then cat3

Is this also possible?

  select * ThingCategory = 'cat2' from the case of things, then 1 when ThingCategory = 'Cat1' then 2 when ThingCategory = 'cat3' then 3 and 4 - Maybe the default case should be, the very end    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -