Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT TOP ???
Message
 
À
25/07/2000 12:31:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00396652
Message ID:
00396666
Vues:
14
I hear you, but that's not what it says. In the example, "For example, if you want to select the top 10 customers with the highest order amounts"

But what you get is not the top ten customers. If 50 customers have the same order amount, you get all 60!


And from VFP help on SELECT - SQL:
TOP nExpr [PERCENT]
Specifies that the query result contains a specific number of rows or a percentage of rows in the query result.

Again, the result set does not contain a specific number of rows. It contains a random number of rows based on a specific number of values.

Perhaps there should be another keyword:

SELECT TOP 10 ROWS
SELECT TOP 10 PERCENT
SELECT TOP 10 VALUES
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform