exception when no_data_found then
...

解决方案 »

  1.   

    也可用select count(*) into 变量 from  表 where ...
    然后判断变量的值是否为0
      

  2.   

    可不可以用nvl(mydate,???)
    ???處我不會寫
      

  3.   

    可以用 select * from bill 
    where bill_datetime is null
      

  4.   

    需要两方面都考虑:
    1、select语句可以执行,返回记录,但其中日期不为空
    2、select语句可以执行,返回记录,但其中日期为空
    3、select语句未返回值
    1,2两种情况可以用select into 某变量,然后判断该变量是否为空
    if 变量 is null then
    else
    end if;
    3情况需要用 exception when no_data_found then来判断。
      

  5.   

    select nvl(col_date,0) into vv from table where.....;
    if vv=0 then
    null;
    else
    ...
    end if;
      

  6.   

    可不可以用nvl(mydate,???)NVL 函数本身只是当mydate数据为空后,对其进行内容替换,而替换的内容就是你所指的???