Locking Hints

  • jholman (3/4/2013)


    Agreed - good question. However the stmt in the explanation is invalid. The alias, 'WTH' was not used in the FROM clause so the SELECT wth.* has no alias to match to. It happens.

    Huh, that's strange! I am 99% certain that when I answered the question (the day it was out), the code in the explanation read:

    SELECT WTH.* FROM #TEST AS WTH (NOLOCK)


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • The original post for the question had SELECT * FROM #TEST WTH(NOLOCK) which was all that was needed to answer the question, in the "blurb" that provided the answer, I did forget to add in the alias 😀

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Dineshbabu (2/21/2013)


    Nice and easy one. Initially I overlooked the word WTH and answered the question. After seeing the explaination only i realised it was mispelled and it will act as alias name.

    Thanks for your brief explaination Chris Büttner ...

    +1

  • didn't even see that WITH was mispelled ! lol

    got 1 point abusively

  • I thought it was a joke.

    But after reading the explanation I noticed the WTH instead of WITH

    Oeps , just lucky that I was right

Viewing 5 posts - 31 through 34 (of 34 total)

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