3.6.08

SQL Teaser - Some magics in SQL Server

I found a superb question from one of the sql server expert and wish to write in my blog,
What could be the output?
Code Snippet
SET ROWCOUNT 0
DECLARE @ int
SET @ =6
print @

I thought the @ symbol should come in the default declaration part and the above snippet should throw an error. OOPS, its not the case @ is considered as a variable.

Happy Learning!!!

Regards,

Venkatesan Prabu . J

2 comments:

  1. hi venkat,
    fine and hope the same.

    i need help from u
    I am working as asp.net developer
    i need job i am having 2 exp
    pls help me
    vellavarasu@yahoo.com

    bye

    ReplyDelete
  2. sorry for the delayed reply.

    Am not doing consultancy jobs.. :-)

    You can check some job related sites.

    Take care,
    Happy learning!!!

    Regards,
    Venkatesan Prabu .J

    ReplyDelete