From: Tompkins Neil Date: August 25 2010 12:28pm Subject: Re: Retrieve three columns in sub query List-Archive: http://lists.mysql.com/mysql/222670 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=00c09f97243a6c9a47048ea5036b --00c09f97243a6c9a47048ea5036b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. 2010/8/25 Jo=E3o C=E2ndido de Souza Neto > As far as I know sub-queries intends to be an only one column and row > result. > > -- > Jo=E3o C=E2ndido de Souza Neto > > "Tompkins Neil" escreveu na mensagem > news:AANLkTi=3DdJkuJCSG=3DKF29SJSp0yLLHMhB02mQzDvzd_dr@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 > FROM > > 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: > http://lists.mysql.com/mysql?unsub=3Dneil.tompkins@stripped > > --00c09f97243a6c9a47048ea5036b--