Connecting Tech Pros Worldwide Help | Site Map

Global Constants for mysql stored procedures!

  #1  
Old July 3rd, 2009, 07:16 AM
Member
 
Join Date: Feb 2009
Posts: 54
Hi,

Can i declare some global constants in mysql, so that it can be used by all the stored procedures??

Thanks in advance,
Lauren
  #2  
Old July 4th, 2009, 01:10 AM
Member
 
Join Date: Aug 2007
Posts: 119

re: Global Constants for mysql stored procedures!


Yes. Use SET GLOBAL as described here.
  #3  
Old July 4th, 2009, 02:29 PM
Member
 
Join Date: Feb 2009
Posts: 54

re: Global Constants for mysql stored procedures!


Thanks a lot for the reply. But can you please tell where all these global variables get stored, i mean will this be a separate file from where we can access for all the stored procedures and where we need to set these global variables?


Thanks,
Lauren
  #4  
Old July 4th, 2009, 04:25 PM
Member
 
Join Date: Aug 2007
Posts: 119

re: Global Constants for mysql stored procedures!


The variables are stored in memory. Even global variables are volatile. When the application is started, global variables default to their original value. If you want to store a value that will be used the next time the application runs, you need to save that to a file and then retrieve it in your coding.

You set the global variables in your coding as described in the article referenced above.
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
A dream of more functional CLP in v8.3 sopranos2@gmail.com answers 38 June 9th, 2006 07:25 PM