Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP new to sql min query
Chris schrieb:
>
> I am trying to return the name value from one table where it equals a min
> amout in another code below but it always come back no rows selected can
> anyone help as i am new to sql
>
> select cname from cust, rental
> where cname in (select min(milesin - milesout) from rental;
SELECT cname FROM cust WHERE CUSTID IN (SELECT CUSTID FROM RENTAL WHERE milesin-milesout=(select min(milesin - milesout) from rental) ;
HTH
Matthias
--
grema_at_t-online.de
Es gibt nichts Neues mehr.
Alles, was man erfinden kann, ist schon erfunden worden.
Charles H. Duell, Leiter des US Patentamtes bei seinem Rücktritt 1899
Received on Tue Feb 23 1999 - 05:02:36 CST