Ankur Jain
What is the difference between a local and a global variable?
By Ankur Jain in SQL Server on Aug 18 2014
  • Manoj Patil
    Jul, 2018 12

    Local Variable: The scope or lifetime of the local variable is within a block or procedure.. E.g.: DECLARE @Variable1Global Variable: The scope or lifetime of the global Variable throughout the execution of the program. E.g.: DECLARE @@Variable1

    • 1
  • Mukesh Kumar
    Sep, 2017 3

    local variable has scope within same session while globle variable has scope in all sessions

    • 0
  • pramod nawale
    Jan, 2015 9

    difference between local table and a global table!!!!!! then What is the difference between a local and a global variable?

    • 0
  • Ankur Jain
    Aug, 2014 18

    A Local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement. A Global temporary table remains in the database permanently, but the rows exist only within a given connection. When connection are closed, the data in the global temporary table disappears. However, the table definition remains with the database for access when database is opened next time.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS