Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a query
Message
 
 
À
21/01/2002 09:50:12
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00607728
Message ID:
00607738
Vues:
21
>I want to count the number of records in one field base on some condition (let's say field1>7)
>How should I do it?
SELECT COUNT(*) FROM mytable WHERE field1 > 7 
* or if you want to exclude records with null in the field from the count
SELECT COUNT(SomeFiled) FROM mytable WHERE field1 > 7
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform