DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: what is "null"

  1. #1
    Join Date
    Sep 2001
    Posts
    99
    I execute "select max(kind_id) into maxTypeid from prod_kind where kind_id like '77' || '__';" sql statement and no data returned. What is the maxTypeid's value? I think it's null value. But I use this statement to judge:
    if maxTypeid = null then
    dbms_output.put_line('no data');
    else
    dbms_output.put_line('a' || maxTypeid || 'b');
    end if;
    This block statement returned "ab". How can I judge maxTypeid value?
    Please help
    thanks
    ocean

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Don't use maxTypeid = null never, because

    null = null --> FALSE

    right statment :

    if maxTypeid is null then
    dbms_output.put_line('no data');
    else
    dbms_output.put_line('a' || maxTypeid || 'b');
    end if;


  3. #3
    Join Date
    Sep 2001
    Posts
    99

    ok,thanks very much

    oh,oh. It's right. thanks very much.
    ocean

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width