0 Replies Latest reply on Aug 22, 2014 1:18 PM by 1044259

    Different return for Oracle 9i and above when using proc to insert more than one column of Varcahr2(4000)

    1044259

      I created a table with 3 VARCHAR2(4000) fileds in Oracle 9i.

      create table tbl_varchar(a varchar2(4000), b varchar2(4000), c varchar2(4000));

      Then, I used proc code to insert values("abc" is a, "def" is b, "ghi" is c) into this table. It returns error "ORA-01461: can bind a LONG value only for insert into a LONG column". But when I inserted only one value(such as only a field "abc") into the table, It works well.

       

      I just created the same table in Oracle 10g or 11g.

      create table tbl_varchar(a varchar2(4000), b varchar2(4000), c varchar2(4000));

      I also used proc code to insert 3 fields into the table. It works well.

       

      First of all, the length of value waiting to insert is only 3 character.

      Secondly, proc code is the same both for Oracle 9i and Oracle 10g or 11g.

      My question is the reasion below situation is only version of Oracle? Why Oracle 9i returns error? What factors or regulations for Oracle 9i to deal with proc code in that situation?

       

      Thanks in advance.