MySQL Forums
Forum List  »  Oracle

Re: Is there anyway for MySQL to store a custom session variable?
Posted by: Dejan Topalovic
Date: November 21, 2006 06:17PM

To set session variable, use:

SET SESSION var = 'some value';
or
SET @@session.var = 'some_value';


To get value from the session variable, use:
SELECT @@session.var;

or in stored routine:
SELECT @@session.var INTO vDummyDeclaredVar;

Session variable applies only to a current client connection.

http://www.baze-podataka.net/
- Database Consultant & DBA -
Certified MySQL 5.0 DBA
Oracle 9i OCP DBA
Oracle 10g OCP DBA



Edited 1 time(s). Last edit at 11/21/2006 06:17PM by Dejan Topalovic.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Is there anyway for MySQL to store a custom session variable?
4497
November 21, 2006 06:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.