Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want only one record in my query.
Message
De
04/06/1999 12:49:59
 
 
À
04/06/1999 12:40:33
Martin Thibault
Minière Québec Cartier
Port-Cartier, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00226574
Message ID:
00226581
Vues:
16
>In this statement : "select * from db where cnum = 'c'".
>
>I want that query return only one record and the query stop after find one record. I don't want that the query scan all the database for it.
>
>What I can append to this query to do it?

Try:

select * TOP 1 from db where cnum = 'c'.

From the theoretical viewpoint your question is a blasphemy (:-)) because the whole theory behind relational databasese and sql is based on sets, therefore a select has always a set as output, which rows are in the output is controled over the where clause. There is not concept like first record, last record and so on. But this is all theory ....
Vlad-Georg
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform