• SQL_Enthusiast (2/20/2013)


    it can't just be random because it's supposed to be unique, correct?)

    why you think that random cant be unique ? sql server internally generate this 32 bit alphanumeric code.

    SQL_Enthusiast (2/20/2013)


    2. How does a NEWID() get ordered by?

    you will get random order as it will give you new values every time. try ORDER BY NEWID() ASC in your any testing query

    a. Does it look at the most left character(s) and say, "You start with an "H...", you with a "BD...", you with a "BA..." you with a "9...", and you with a "3..."; therefore, return you in this order BA..., BD..., H..., 3..., 9...")

    Yes, a kind of

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)