Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count() in SQL??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00128117
Message ID:
00130833
Vues:
26
>You can get what you want with one SELECT.
>
>SELECT s_or_status, COUNT(*) FROM TableName GROUP BY s_or_status INTO CURSOR Result
>
>Result will have one record for each Status value with the count of records that had that value.

Just a caution when using COUNT(*): This will count records with NULLs! If you COUNT(), it won't count the field if its value is NULL.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform