在SQL*PLUS中没办法,插入LONG RAW的值,但我试验了is not null和is null
两种条件,其查询结果是不同的,感觉应该可以对long raw字段使用is null条件。SQL> create table test
  2  ( name varchar(10),
  3    image long raw);表已创建。SQL>   
SQL> insert into test(name) values('a');已创建 1 行。SQL> insert into test(name) values('b');已创建 1 行。SQL> select name from test where image is not null;未选定行SQL> select name from test where image is null;NAME
----------
a
b

解决方案 »

  1.   

    SQL> declare
      2  a long raw;
      3  begin
      4  a:=hextoraw('ddd');
      5  if a is null then
      6  dbms_output.put_line('没有');
      7  else
      8  dbms_output.put_line(a);
      9  end if;
     10  end;
     11  /
    0DDD
      

  2.   

    create table dd(id varchar(1),image long raw);SQL> insert into dd values('1',hextoraw('aaa'));1 row insertedSQL> insert into dd values('2',hextoraw('bbb'));1 row insertedSQL> select * from dd;ID IMAGE
    -- -----
    1  <Long
    2  <LongSQL> select * from dd where image is not null;ID IMAGE
    -- -----
    1  <Long
    2  <LongSQL>  select * from dd where image is null;ID IMAGE
    -- -----
      

  3.   

    我是使用is null来判断的,