Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is SQL using TOP clause reliable?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00260293
Message ID:
00260320
Vues:
13
>>Why do you ask?
>>
>>>Is SQL using TOP clause, with a order by clause, reliable?
>>>Has anyone found to it to give incorrect results?
>
>A SQL statement I use, containing the phrase'TOP 20' was reported as returning more than 20 items. It was also mentioned by a associate that the clause 'TOP' was unreliable.
>
>It is valuable to know others experience (if any) when trying to determine the cause of a problem.
>
>Thanks!

Jeff,

It depends on your ORDER BY clause. If the field in this clause contains unique values, then you should get back the number of rows you desire. However, if they're not unique, you'll get back more.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform