• Rajasekhar Reddy (5/26/2010)


    Hi,

    select command in the code is used for assginign variables not to print any output.

    the given code won't return any value.

    Thanks,

    RajaSekhar Reddy .K

    That is entirely correct. Of course, the question was "what result will @hourdiff hold?", not "what will be returned when you run this code", so I fail to see the significance of this observation.


    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/