Re: i can't insert 'a''a' in a field with size 3

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 10 Mar 2008 10:18:10 -0700
Message-ID: <1205169486.924963@bubbleator.drizzle.com>


Fici wrote:
> hi,
> i run
> INSERT INTO test (FIELD1) VALUES ('a''a')
> but DBMS oracle returns this error:
> ORA-01401: inserted value too large for column
> (FIELD1 size is 3!)
> what's the error?

SQL> create table test (

   2 field1 VARCHAR2(3));

Table created.

SQL> INSERT INTO test

   2 (field1)
   3 VALUES
   4 ('a''a');

1 row created.

SQL> SELECT * FROM test;

FIE

---
a'a

SQL>

try the following in SQL*Plus:

show define

Post the result

If you are not using SQL*Plus then your front-end tool is
defective or needs to be reconfigured.
-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Mar 10 2008 - 12:18:10 CDT

Original text of this message