Hello and welcome to our community! Is this your first visit?
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
    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. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 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.
    Be yourself. No one else is as qualified.


Posting Permissions

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