Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Update nls_length_semantics!

Re: Update nls_length_semantics!

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 1 Dec 2004 09:30:52 +0100
Message-ID: <41ad8061$0$14239$636a15ce@news.free.fr>

"Hans" <sorry_at_nospam.com> a écrit dans le message de news:cojtus$r1f$1_at_green.tninet.se...
> Hi Michel!
>
> > Did you try "alter table modify"?
> >
>
> No I haven't tried this. I thought you could only use this to convert fields
> from for example varchar2-->nvarchar2. This is not what I want. I just want
> to change the nls_length_semantics from byte to char.
>
> Regards
> /Hans
>
>

You should try:

SQL> create table t (col varchar2(10 byte));

Table created.

SQL> select column_name, char_length, char_used from user_tab_columns where table_name='T';

COLUMN_NAME                    CHAR_LENGTH C
------------------------------ ----------- -
COL                                     10 B

1 row selected.

SQL> alter table t modify (col varchar2(10 char));

Table altered.

SQL> select column_name, char_length, char_used from user_tab_columns where table_name='T';

COLUMN_NAME                    CHAR_LENGTH C
------------------------------ ----------- -
COL                                     10 C

1 row selected.

Regards
Michel Cadot Received on Wed Dec 01 2004 - 02:30:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US