To place it the bottom line is - Within an oracle db, I wish to create a column varchar2(16) that is now varchar2(8), without having affected the values presnet. I've already attempted this also it does strange things.

The query I attempted was - alter table SOME_TABLE modify (SOME_COL varchar2(16)) However the values(some not every) already contained in the table get '' appended for them after i run the above mentioned query.

So, what's the proper way to do things i want?

It is extremely doubtful the raw data within the table has been transformed. Since a number of your comments imply you're using tools and programs apart from SQLPlus to check out and process the information, I want to check out whether or not they are mishandling the information in some manner.

Here's a good example where I attempted to breed that which you did in straight SQLPlus. No null bytes are appended towards the existing data:

SQL> create table foo (bar varchar2(8));

Table created.

SQL> insert into foo        
  2  select lpad(to_char(level),level)
  3    from dual 
  4    connect by level <=8;

8 rows created.

SQL> commit;

Commit complete.

SQL> select bar,dump(bar) from foo;

BAR
--------
DUMP(BAR)
--------------------------------------------------------------------------------
1
Typ=1 Len=1: 49

 2
Typ=1 Len=2: 32,50

  3
Typ=1 Len=3: 32,32,51

   4
Typ=1 Len=4: 32,32,32,52

    5
Typ=1 Len=5: 32,32,32,32,53

     6
Typ=1 Len=6: 32,32,32,32,32,54

      7
Typ=1 Len=7: 32,32,32,32,32,32,55

       8
Typ=1 Len=8: 32,32,32,32,32,32,32,56


8 rows selected.

SQL> alter table foo modify (bar varchar2(16));

Table altered.

SQL> select bar,dump(bar) from foo;

BAR
----------------
DUMP(BAR)
--------------------------------------------------------------------------------
1
Typ=1 Len=1: 49

 2
Typ=1 Len=2: 32,50

  3
Typ=1 Len=3: 32,32,51

   4
Typ=1 Len=4: 32,32,32,52

    5
Typ=1 Len=5: 32,32,32,32,53

     6
Typ=1 Len=6: 32,32,32,32,32,54

      7
Typ=1 Len=7: 32,32,32,32,32,32,55

       8
Typ=1 Len=8: 32,32,32,32,32,32,32,56

The command you're performing is correct.

Are you certain the extra figures you're seeing aren't already present?

If little else matches your needs, you could perform the following:

  1. Give a new column with a brand new title
  2. Copy the values in the old column towards the brand new one using UPDATE
  3. Remove that old column
  4. Relabel the brand new column towards the old a person's title

It's lengthy and cumbersome and brute pressure, but when you cannot take action every other way, it'll work...

Mostly accept Dork Costa. Might there be considered a cache that also thinks the information may be the old '8' size. Whenever you say "some not everyInch values obtain the extra , what's the consistent factor ? Could they be the same length (eg 7 or 8 figures) or might they've been placed as the ALTER column had been done or before some srver restart ?

No solutions, but such like got elevated a few days ago here. Maybe attempt to compare notes.