• sknox (2/28/2011)


    mtassin (2/28/2011)


    I got this right but...

    SELECT 0%0

    gives

    Msg 8134, Level 16, State 1, Line 1

    Divide by zero error encountered.

    So it seems you can use it to divide 0 by 0 and get an error.

    🙂

    This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])

    Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.

    p.s. To be more clear, it looks like a small zero divided by zero: 0/0.

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