database - how to declare global variable in sql -
I want to make a global script in a skeleton. For my understanding, using DECLARE, I would be able to create local variables only.
Any idea how to make it?
Thanks
Assuming MS SQL Server, and " Definition can not be assumed. If you need access to a variable in many stored procedures, or ad-hook questions, then you will need some other ways to keep the data: a table that holds the variable for you.
Note: : Hyperlinks do not go to Microsoft, I could not find a copy of Microsoft's specific definition, but the linked website came very close to this discussion.
Comments
Post a Comment