Global in what regards? Global across Stored Procs? Global across connections?
I would think that where you have a need for such globals, that you store them as meta-data in your database. Just create a new table, called "GLOBAL_VARIABLES" or somesuch, give them a name and a data type, value, etc, and nice SPs for getting, setting, locking...etc.
Yeah something like that might work. But what I'm trying to do is call a function, set the global variable, then call then function again and remember the global. Maybe there's no easy way to do this in T-SQL.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.