Reputation: 2084
I want to select some records using two tables avion
and vol
, but when I run my statement I get this error :
ORA-00913: too many values
This is my statement :
select distinct avion.avnum, avion.avnom from avion, vol
where avion.avnum = vol.avnum
AND vol.plnum in (
select pilote.plnum, pilote.salaire from pilote
where salaire > (
select salaire from pilote
where plnom ='Tsukishima'
)
)
AND avion.avnom <> 'Boeing 777';
How can I solve this problem ?
Upvotes: 0
Views: 278
Reputation: 11117
Try this:
select distinct avion.avnum, avion.avnom from avion, vol
where avion.avnum = vol.avnum
AND vol.plnum in (
select pilote.plnum from pilote
where salaire > (
select salaire from pilote
where plnom ='Tsukishima'
)
)
AND avion.avnom <> 'Boeing 777';
Upvotes: 1