Hi M,
This appears to do exactly what I require. Thank you !
Cheers
Neil
On Wed, Aug 25, 2010 at 1:43 PM, misiaQ wrote:
> select ci.*, ct.* from (select name, countrycode from city) ci, country ct
> where ci.countrycode = ct.code
>
> Regards,
> m
>
> -Original Message-
> From: Tompkin
Not tested, but i think it could work for you:
SELECT
student_age,
(SELECT
student_subjects_id
FROM
student_subjects
ORDER BY
RAND()
LIMIT 1) as subject_id,
(SELECT
random_mark
FROM
student_subjects
having
student_subj
select ci.*, ct.* from (select name, countrycode from city) ci, country ct
where ci.countrycode = ct.code
Regards,
m
-Original Message-
From: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
Sent: Wednesday, August 25, 2010 1:23 PM
To: [MySQL]
Subject: Retrieve three columns in sub qu
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ão Cândido de Souza Neto
> As far as I know sub-queries intends to be an only one column and row
> result.
>
> --
> João Cândido de Souza Neto
>
> "
As far as I know sub-queries intends to be an only one column and row
result.
--
João Cândido de Souza Neto
"Tompkins Neil" escreveu na mensagem
news:aanlkti=djkujcsg=kf29sjsp0yllhmhb02mqzdvzd...@mail.gmail.com...
> Hi
>
> Is it possible in MySQL 5.1 to retrieve three columns in a select
>