|
|
Subject:
Character datatypes in Oracle
Category: Computers > Programming Asked by: lhb-ga List Price: $5.00 |
Posted:
01 Dec 2005 09:34 PST
Expires: 26 Dec 2005 19:16 PST Question ID: 600071 |
I have a problem with varchar2 in oracle. First I declared a column using CHAR(1) STATUS CHAR(1) Then later I alter that collumn to VARCHAR2(10). Now, everytime I insert new value to the column, it always right-pad with space to lenght 10. I am sure that the column data type is VARCHAR2(10) and it should not have this problem since VARCHAR2 stores variable-lenght character string. Is it suppose to hapen when I alter column from CHAR(1) to VARCHAR2(10)? what could be wrong here? Thanks lhb |
|
There is no answer at this time. |
|
Subject:
Re: Character datatypes in Oracle
From: scubajim-ga on 01 Dec 2005 10:37 PST |
in sqlplus type desc thetablename What does the definition say? |
Subject:
Re: Character datatypes in Oracle
From: lhb-ga on 01 Dec 2005 11:10 PST |
it says VARCHAR2(10) |
Subject:
Re: Character datatypes in Oracle
From: chivas314159-ga on 04 Dec 2005 09:47 PST |
Please state your database version and OS. For example: I have a 9.2.0.6 Oracle Database running on SuSE Linux 9. |
Subject:
Re: Character datatypes in Oracle
From: chivas314159-ga on 04 Dec 2005 09:53 PST |
... Also state how you insert a new record. |
Subject:
Re: Character datatypes in Oracle
From: observer_ip-ga on 24 Dec 2005 16:11 PST |
Please run below test on you database and provide results. Generally use of "dump" is the best way to debug column content. Database: 9.2.0.1 SQL> create table x ( c char(1) ); Table created. SQL> insert into x values ( 'x' ); 1 row created. SQL> commit; Commit complete. SQL> alter table x modify c varchar2(10); Table altered. SQL> select dump(c) from x; DUMP(C) -------------------------------------------------------------------------------- Typ=1 Len=1: 120 SQL> |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |