在计算过程中,需要找到第一个空值的ID,如下所示:
ID value
1    0.5
2    0.7
3    null
4    null
5    null
第一个出现空值的是ID=3的时候,怎么查询?

解决方案 »

  1.   

    select * from  Table where value is null limit 1
      

  2.   

    select min(id) from tb where value is null
      

  3.   

    Select * From table1 where `value` IS NULL order by id limit 1 
      

  4.   

    select min(id) from  Table where value <=> null;
      

  5.   

    应该是Select IDFrom table where `value` IS NULL order by ID limit 1
      

  6.   

    Select IDFrom tt where `value` IS NULL order by ID limit 1