Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select just one record
Message
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Divers
Thread ID:
00666063
Message ID:
00666306
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Hello *.Tomazetti;

To get a select to return just the first n number of matching rows add ROWNUM = n to your WHERE clause; (or just simply grabbing the first record in a FETCH is just as efficient.)

Is there some reason you are using a cartesian join in your select?

>hello *.*
>
>I need to select just the first record from a SELECT STATMENT, like this:
>
>
>SELECT customer.OID, reserv.OID
>     from customer, reserv
>     where customer.OID = 1234
>     into cursor test
>
>Ok, this SELECT may return many records, but I want select just the first record. How can I do it ?
>
>I´ve tried use the SAMPLE STATMENT, but We can´t use this statment with 2 tables or more.
>
>Please, help me!
>
>Thank you ALL
George
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform