• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to Modify variable length

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i need to modify the variable length from 2 to 3.
how to do that, without loosing the table data.


grant_package NUMBER(2,0) NOT NULL,
work_code NUMBER(3,0) NOT NULL,


thanks in advance,
shailaja
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shialaja,

if you are speaking of the length of columns in the DB the solution is the command

"alter table modify (column_name datatype)".

With an alter table command you won't loose data (except if you drop columns, of course).

You can find details of the alter table statement in the Oracle documentation,e.g. here:

Alter Table


John

 
reply
    Bookmark Topic Watch Topic
  • New Topic