Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    93
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Equations in ORDER BY statements

    Is this possible ? And would it slow down the server with a query on a table with around 10,000 entries ?

    My query is currently
    SELECT title, number1, number2 ORDER BY number1

    i would like to do something like this
    SELECT title, number1, number2 ORDER BY (number1 + (number2 *100))

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,198
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    Not to ask a really really silly question, but...

    WHY did you not simply TRY it? Would have taken much less time than waiting here for an answer.

    Yes, you can do that.

    With only 10,000 records in the table, I wouldn't expect to see any serious performance hit. Probably not even a noticeable one.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •