- Such as I have a table of User---(id,name,age,hobby,sports)
- Then it has a record that (1,"zhangsan",18,null,null);
- Next you can see the total of record is 3, because hobby and sports are null.
use SQL sentences to count the number of existing values in a field in a record
Help and thanks
Use
CASEexpressions to count each column.