| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: A query without a sub-query: can we do it?
David Fitzjarrell <oratune_at_aol.com> writes:
> This sounds like homework to me
To me as well.
>
> select lab_id
> from lab
> where user_id = 2
> minus
> select lab_id
> from lab
> where user_id = 9
>
> No formal subquery there.
In which case you can console your guilt by the fact that I suspect the teacher will consider this an incorrect answer. It's oracle specific and it sounded like his question was coming from a theoretic angle and the teacher probably expects a standard SQL response.
Indeed there is a way to do this in standard SQL without a subquery. You might want to read up on outer joins.
-- gregReceived on Thu Nov 23 2000 - 22:27:11 CST
![]() |
![]() |