Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: IF EXISTS vs @@ROWCOUNT

    For extra credit, here is the MERGE:

    MERGE @Table T

    USING (SELECT 5 AS col1, 1000 AS col2) AS V

    ON T.col1 = V.col1

    WHEN NOT MATCHED

    THEN INSERT (col2)...

  • RE: Random unions

    Nice question!

    I was surprised that the final RAND() also returns a constant value after a previous call with a seed. It's in the Remarks in BOL, so I guess it's...

  • RE: ROW_NUMBER

    The result is undefined without an ORDER BY in the main query. Most likely the results will be sequential by ID.

Viewing 3 posts - 1 through 3 (of 3 total)