You can use the SUM (not COUNT!) combined with the CASE statement, this way: SELECT SUM(CASE WHEN myColumn=1 THEN 1 ELSE 0 END).
確定! 回上一頁