Not tested, but i think it could work for you:
LIMIT 1) as subject_id,
student_subject_id = subject_id) as random_mark,
student_subject_id = subject_id) as subject
student_age > 10
"Tompkins Neil" <neil.tompkins@stripped> escreveu na mensagem
I thought as much, if anyone else can shed some light that would be great.
If not, I'm going to have to write an additional query.
> As far as I know sub-queries intends to be an only one column and row
> "Tompkins Neil" <neil.tompkins@stripped> escreveu na mensagem
> news:AANLkTi=dJkuJCSG=KF29SJSp0yLLHMhB02mQzDvzd_dr@ style="color:#666">stripped...
> > Hi
> > Is it possible in MySQL 5.1 to retrieve three columns in a select
> > sub-query
> > like below :
> > SELECT student_age, SELECT (student_subjects_id, random_mark, subject
> > student_subjects ORDER BY RAND(), LIMIT 1)
> > FROM students
> > WHERE student_age > 10
> > ORDER BY RAND()
> > LIMIT 1
> > I've looked and tried everything, but nothing seems to work...
> > Cheers
> > Neil
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: