The Percent Sign in T-SQL

  • thanks for the question - straight forward.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Thanks for the nice easy start to the week!

  • SanDroid (2/28/2011)


    So happy that over 80 percent of us know math.

    Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?

    What's maths got to do with it? The use of % for modulo is a computing term. The mathemetical equivalent would be 'mod', though it's meaning is similar rather than identical.

    eg 8 % 6 = 2

    means roughly the same as

    8 = 2 (mod 6)

    or more accurately

    8 = 2 (mod 6)

    (note it's 25 years since I graduated so I'm probably about to be humilated when someone points out that I'm talking nonsense :-))

  • Ambiguity in the question..!

    Answer should be both..

    (1) divide by zero/ (2) remainder.

    Thanks.

  • OK, the next time I submit a question, I'll be sure that the fluke answer, if there is one included, can in no way be misconstrued as a possible right answer.

    I think some of you are used to trick questions, so you're looking for a sneaky answer.

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • mtillman-921105 (3/1/2011)


    OK, The next time I submit a question, I'll be sure that the fluke answer, if there is one included, can in no way me misconstrued as a possible right answer.

    I think some of you are used to trick questions, so you're looking for a sneaky answer.

    LOL... Perhaps we should also put in hints like....

    "This is not the right answer"

    "Don't click this for points"

    "j/k"

    "Check this answer to win!"

    I saw nothing wrong with your question and understand a math joke when I read one. I liked your question, please do not change it at all.

    It tested much more than peoples knowledge of SQL and questions that can do that are priceless.

  • Toreador (3/1/2011)


    or more accurately

    8 = 2 (mod 6)

    Tell me what the "=" is and we will use wet noodles for the beating. :w00t:

  • SanDroid (3/1/2011)


    Toreador (3/1/2011)


    or more accurately

    8 = 2 (mod 6)

    Tell me what the "=" is and we will use wet noodles for the beating. :w00t:

    It can mean a lot of things, but usually it is a strong indicator of equality or identity.

    http://en.wikipedia.org/wiki/Triple_bar

    http://en.wikipedia.org/wiki/List_of_logic_symbols

    http://en.wikipedia.org/wiki/Congruence_relation

    http://en.wikipedia.org/wiki/Equals_sign

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • SanDroid (3/1/2011)


    Tell me what the "=" is and we will use wet noodles for the beating. :w00t:

    "Is equivalent to", or "is exactly the same thing as"

    (Stronger than '=')

  • Good question and thank you.

Viewing 10 posts - 16 through 24 (of 24 total)

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