select
*
from
pet
order by
field(species, 'cat', 'dog', 'bird') desc
Ref : http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks
*
from
pet
order by
field(species, 'cat', 'dog', 'bird') desc
Ref : http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks
No comments:
Post a Comment