Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is SQL using TOP clause reliable?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00260293
Message ID:
00260320
Views:
12
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform