MySQL Forums
Forum List  »  Newbie

Re: using variables in select statements
Posted by: pearsojd
Date: August 24, 2004 06:36AM

Hi,

Am not sure what your example is demonstrating, but here is a different example of assigning and using variables (`exam` is an attribute);

select @exam_student1 := exam from student where student_id ='1'

this should return a result set. Then you can use the variable e.g;

select * from student where exam > @exam_student1;

Hope this helps.

James.

Options: ReplyQuote


Subject
Written By
Posted
Re: using variables in select statements
August 24, 2004 06:36AM


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.