SQL SERVER||Stored Procedure to get Gender count from a table

Pubblicato il: 19 febbraio 2023
sul canale di: LearnSQLtoSSIS
131
2

Stored Procedure to get gender count from a table

ALTER Procedure GetGenderCount
@gender nchar(1),
@gendernew nchar(1)
AS
SELECT SUM(CASE WHEN gender='M' THEN 1 ELSE 0 END) AS Male_Count
,SUM(CASE WHEN gender='F' THEN 1 ELSE 0 END) AS Female_Count
FROM [Persondata$]
WHERE gender = @gender OR gender = @gendernew
GROUP BY gender

EXEC GetGenderCount M,F


In questa pagina del sito puoi guardare il video online SQL SERVER||Stored Procedure to get Gender count from a table della durata di ore minuti seconda in buona qualità , che l'utente ha caricato LearnSQLtoSSIS 19 febbraio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 131 volte e gli è piaciuto 2 spettatori. Buona visione!