查找在CASE_SET_ID为某个条件下的最小缺失编号 如 1 3 获取的值是2 , 2 3则获取的值是1
/**
* select
* case when not exists(select * from rt_test_case where CASE_NUM=1) then 1
* else (select min(IFNULL(CASE_NUM,0)+1) from rt_test_case as a
* where
* not exists(
* select CASE_NUM
* from rt_test_case as b
* where IFNULL(a.CASE_NUM,0)+1=b.CASE_NUM AND a.CASE_SET_ID = b.CASE_SET_ID
* ) and CASE_SET_ID = '10383') end
* */