select count(*) from information_schema.columns where table_name='t1'

解决方案 »

  1.   

    select count(*) from 表 where 字段 is not null
      

  2.   

    select 字段a when is null then '1' else '0'+ 字段b when is null then '1' else '0'
           +字段a when is null then '1' else '0'+...+ 字段w when is null then '1' else '0'
    from table 
    where 主键字段=''
    这样是否能找出一行中的为null的总数。
      

  3.   

    不明白会有什么意义记录: 1,'111',null,null--->需要得到2吗 ?