Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Max(field1) + its corresponding fields?
Message
De
22/10/2001 11:23:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00571652
Message ID:
00571667
Vues:
27
>If you have an index on Field2, the following code will give you all records, which have max Field2:
>
>select field1, field2 from Table1 where field2 in (select max(field2) from table1)
Nadya,

It seems to me that the SELECT you posted doesn't require any index (except for optimization).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform