Sorting by value with ORDER BY?

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-04-05T15:58:34Z Indexed on 2010/04/05 16:03 UTC
Read the original article Hit count: 89

Filed under:
|
|

For clarification, are you able to use MySQL this way to sort?

ORDER BY CompanyID = XXX DESC

What I am trying to do is use one sql query to sort everything where X = Y, in this case, where CompanyID = XXX. All values where CompanyID is not XXX should come after all the results where CompanyID = XXX.

I don't want to limit my query but I do want to sort a particular company above other listings.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql