MySQL Forums
Forum List  »  Newbie

why does the 'SET @a=10' command return NULL value?
Posted by: Ilya Rzhevskiy
Date: December 27, 2007 12:48PM

I tried the following:
set @a=10;
select @a;

the result gives NULL. Isnt @a supposed to be 10? I also tried a more complicated things like
set @a=(select MAX(column) from table);
select @a;
it gives me NULL again.

Am I doing something wrong? How can I save a variable or an expression in a simpler variable like @a?

Options: ReplyQuote


Subject
Written By
Posted
why does the 'SET @a=10' command return NULL value?
December 27, 2007 12:48PM


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.