Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44

    Smile Unanswered: Creating the table with nvarchar2(4000) in oracle 9i

    Hi Oracle Gurus,
    I have a problem in creating the table with NVARCHAR2(4000) in oracle 9i. If i create a table with NVARCHAR2(2000) and describe, it shows as NVARCHAR2(4000). Please let me know what is the problem. I am able to create the same table in oracle 8.1.7 with NVARCHAR2(4000).
    Here i am sending output that what i have tried to do.


    SQL*Plus: Release 8.0.6.0.0 - Production on Tue Mar 18 14:57:27 2003
    (c) Copyright 1999 Oracle Corporation. All rights reserved.

    Connected to:
    Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
    With the Partitioning option
    JServer Release 9.0.1.1.1 - Production

    14:57:45 MayuSQL >create table temp(name nvarchar2(4000));
    create table temp(name nvarchar2(4000))
    *
    ERROR at line 1:
    ORA-00910: specified length too long for its datatype

    15:01:34 MayuSQL >create table temp(name nvarchar2(2000));

    Table created.

    15:01:49 MayuSQL >desc temp;
    Name Null? Type
    ------------------------------- -------- ----
    NAME NVARCHAR2(4000)


    Thanks in advance
    Mahesh

  2. #2
    Join Date
    Jan 2003
    Location
    Woking
    Posts
    107

    Re: Creating the table with nvarchar2(4000) in oracle 9i

    Originally posted by mahesh_bk1
    Hi Oracle Gurus,
    I have a problem in creating the table with NVARCHAR2(4000) in oracle 9i. If i create a table with NVARCHAR2(2000) and describe, it shows as NVARCHAR2(4000). Please let me know what is the problem. I am able to create the same table in oracle 8.1.7 with NVARCHAR2(4000).
    Here i am sending output that what i have tried to do.


    SQL*Plus: Release 8.0.6.0.0 - Production on Tue Mar 18 14:57:27 2003
    (c) Copyright 1999 Oracle Corporation. All rights reserved.

    Connected to:
    Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
    With the Partitioning option
    JServer Release 9.0.1.1.1 - Production

    14:57:45 MayuSQL >create table temp(name nvarchar2(4000));
    create table temp(name nvarchar2(4000))
    *
    ERROR at line 1:
    ORA-00910: specified length too long for its datatype

    15:01:34 MayuSQL >create table temp(name nvarchar2(2000));

    Table created.

    15:01:49 MayuSQL >desc temp;
    Name Null? Type
    ------------------------------- -------- ----
    NAME NVARCHAR2(4000)


    Thanks in advance
    Mahesh

    Hi Mahesh,

    Please verify your observation because i am getting


    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Mar 18 13:16:20 2003

    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production

    SQL> create table temp(name nvarchar2(4000));
    create table temp(name nvarchar2(4000))
    *
    ERROR at line 1:
    ORA-00910: specified length too long for its datatype

    SQL> create table temp(name nvarchar2(2000));

    Table created.

    SQL> desc temp
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    NAME NVARCHAR2(2000)
    nn

Posting Permissions

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