• It is in your court now. Sorry, but even if the two queries come back once with the same results, the answer is still NO. The reason is consistently return the same results. If BETWEEN 3 AND 5 was the same as BETWEEN 5 AND 3, the results of each run would have been consistant between the two queries.

    😎

    Don't forget the third option: NOT KNOWN.

    We all know that the question was about BETWEEN, so why the hell did they use RAND() and some dodgy table?

    I would phrase the question like this: do BETWEEN a AND b and BETWEEN b AND a in the WHERE clause have the same effect? YES/NO/UNKNOWN.

    Let's put a fullstop on this. Everyone knows now the mechanics of BETWEEN and difference between BETWEEN a AND b and BETWEEN b AND a. The problem is that for me as a mathematician and a programmer, the original question contained redundant and confusing irrelevant information. Nevertheless I answered the question correctly since I guessed the purpose and ignored the dodgyness of the testbed. Though I decided to raise the conversation for the conversation sake so that everyone knows that not all questions comes clear to everyone as it does to the person asking the question. Thats all.

    over

    M.Sc.IT, M.B.A, MCTS BI 2008, MCITP BI 2008, MCTS SQL Dev, CSM, CDVDM