Use of BETWEEN and DATETIME

  • Argh, trick question. You answer what you thing the question is not what it really is!

  • Nice question.

    I wondered what on earth it was about when I first looked at it. Then noticed the order, and remembered that "BETWEEN" is just another reason why it's a good job the name was changed from Structured English QUEry Language (SEQUEL) to Structured Query Language (SQL).

    Actually, I think the semantics of BETWEEN are an appallingly stupid piece of language design. Even though it's documented, it leads to lots of problems.

    Tom

  • L' Eomot Inversé (10/1/2011)


    Nice question.

    I wondered what on earth it was about when I first looked at it. Then noticed the order, and remembered that "BETWEEN" is just another reason why it's a good job the name was changed from Structured English QUEry Language (SEQUEL) to Structured Query Language (SQL).

    Actually, I think the semantics of BETWEEN are an appallingly stupid piece of language design. Even though it's documented, it leads to lots of problems.

    I agree. I never use it myself but do come upon it when I clean up my colleagues code occasionally.

  • Changing the order after BETWEEN is not an issue related to DATETIME. If the question was intended to demonstrate the value of a DATETIME type without the time part then I'm afraid it was failed the right way.

  • Trick questions accomplish little other than to show off the cleverness of the author. How many of us would write legitimate code where we assign variables like this? I am betting that most if not all would assign the variables sequentially and the code would return the expected results. Very disappointing question.

    Roland Alexander 
    The Monday Morning DBA 
    There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer

  • Got me. Just skimmed the code and chose the obvious answer (and was wrong!).

    Not necessarily a trick question, more an object lesson in reading the code properly.

  • This does educate.. We should read it carefully before answering. Every word is a question.

    Taught me though..

    Thanks.

Viewing 7 posts - 61 through 66 (of 66 total)

You must be logged in to reply to this topic. Login to reply