COUNT

Sintassi

COUNT(espr)

Spiegazione

Restituisce il numero di valori non-NULL di espr presenti nelle righe restituite dall'istruzione SELECT. Il risultato è un valore BIGINT.

COUNT() restituisce 0 se non vi sono righe.

Esempi

SELECT studenti.nome_studente,COUNT(*)
       FROM studenti,corsi
       WHERE studenti.id_studente=corsi.id_studente
       GROUP BY nome_studente;

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.