TSQL

  • The QoTD did not mention which version of SQL it was referring to. That's why further up I said that the link given in the explanation mentions SQL2000, and that under SQL2K8 (and SQL2K5, which I subsequently confirmed) the only functions out of that list that cannot be used are RAND() and NEWID().

    Hope this clears things up 🙂

    Jan

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • The answer is clearly both Yes and No. From BOL (2005)

    All mathematical functions, except for RAND, are deterministic functions. This means they return the same results each time they are called with a specific set of input values. RAND is deterministic only when a seed parameter is specified. For more information about function determinism

    So clearly the answer is YES IF you provide a seed value.

    However another BOL (2005) reference states

    The following built-in functions from other categories are always nondeterministic

    and then includes RAND in the list.

Viewing 2 posts - 31 through 31 (of 31 total)

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