difference between the local variable and globla variable

  • hi team,

    Could you plesae explian with any example how to use/declare local and globle variables in t-sql block..

    Thanks,

    Dastagiri

  • No such thing as global variables in T-SQL. They used to call some of the system functions "global variables", but they never really were that, and Microsoft stopped calling them that years ago.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • dastagiri16 (10/3/2012)


    hi team,

    Could you plesae explian with any example how to use/declare local and globle variables in t-sql block..

    Thanks,

    Dastagiri

    The concept of "global variables" doesn't really exist in T-Sql. You could probably "mimic" them with the use

    of ##Temporary Tables but it might be best if you specify what you are trying to achieve as you will almost certainly get pointed in a better direction here.

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

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