Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Command to change BYTE semantics to CHAR for a table column

York35May 11 2009 — edited May 11 2009
DB version:10gR2

I know that there is an ALTER TABLE tablename MODIFY command to change the NLS_LENGTH_SEMANTICS for a table column.

I need to change EMP table's Ename and Job column to CHAR. How can i do this with an ALTER command?
SQL>col data_Type format a12
SQL>col column_name format a10
SQL>
SQL>select COLUMN_NAME, DATA_TYPE,DATA_LENGTH, CHAR_LENGTH,CHAR_USED
  2  from dba_tab_columns
  3  where table_name='EMP' and owner = 'SCOTT';

COLUMN_NAM DATA_TYPE    DATA_LENGTH CHAR_LENGTH C
---------- ------------ ----------- ----------- -
EMPNO      NUMBER                22           0
ENAME      VARCHAR2              10          10 B
JOB        VARCHAR2               9           9 B
MGR        NUMBER                22           0
HIREDATE   DATE                   7           0
SAL        NUMBER                22           0
COMM       NUMBER                22           0
DEPTNO     NUMBER                22           0

8 rows selected.
This post has been answered by rbglossip on May 11 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2009
Added on May 11 2009
2 comments
852 views