If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Modify a cloumn data type

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Dec 2012
Posts: 3
Modify a cloumn data type

hi everyone i am new on Oracle...


i created a table
create table UNI
Quote:
(UNAME varchar2(1),
UNIID number(5),
UADDRESS varchar2(20),
URANK number(4),
PCode number(4)
);
the problem on first line
Quote:
UNAME varchar2(1)
i want change this
Quote:
UNAME varchar2(12)

plz help me out this problem..
thanks..

Last edited by crystal mind; 12-29-12 at 10:54.
Reply With Quote
  #2 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 11,662
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Dec 2012
Posts: 3
i did this ...
but not succeeded
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,497
Code:
DROP TABLE UNI;
CREATE TABLE uni 
  ( 
     uname    VARCHAR2(12), 
     uniid    NUMBER(5), 
     uaddress VARCHAR2(20), 
     urank    NUMBER(4), 
     pcode    NUMBER(4) 
  );
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Dec 2012
Posts: 3
I know this situation and have done many times....
but u did not get my point...
i apply
alter.....modify
alter ....drop column etc...
but these are not working so i asked to u ppl how can i remove this one...
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,497
>but these are not working

my car is not working.
tell me how to make my car go.

It is difficult to say what you are doing wrong when we have NO idea what exactly you are actually doing.

is COPY & PASTE broken for you?
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,497
Code:
SQL> CREATE TABLE uni
  2    (
  3       uname    VARCHAR2(1),
  4       uniid    NUMBER(5),
  5       uaddress VARCHAR2(20),
  6       urank    NUMBER(4),
  7       pcode    NUMBER(4)
  8    );

Table created.

SQL> desc uni
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 UNAME                                              VARCHAR2(1)
 UNIID                                              NUMBER(5)
 UADDRESS                                           VARCHAR2(20)
 URANK                                              NUMBER(4)
 PCODE                                              NUMBER(4)

SQL> alter table uni modify uname varchar2(12);

Table altered.

SQL> desc uni
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 UNAME                                              VARCHAR2(12)
 UNIID                                              NUMBER(5)
 UADDRESS                                           VARCHAR2(20)
 URANK                                              NUMBER(4)
 PCODE                                              NUMBER(4)

SQL>
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On