Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: 'MODIFY' HELP

Re: 'MODIFY' HELP

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sun, 25 Oct 1998 23:32:44 GMT
Message-ID: <3633b4da.357764@192.86.155.100>


A copy of this was sent to K C Grimes <kcgrimes_at_erols.com> (if that email address didn't require changing) On Sun, 25 Oct 1998 15:51:34 -0500, you wrote:

>My student textbook sucks....and I'm looking for a simple alter command
>to increase a table column length.
>My table "sample":
> Name varchar2(20),
> Address varchar2(30),
>
>Now...I want to increase Name to 30 characters after the table is
>created. I see the ALTER command in my book, but the syntax for both
>commands gets an error message.
>I am using:
> alter table sample
> MODIFY (Name varchar(30));
>
>and...
> alter table sample
> MODIFY (column Name varchar2(30));
>
>Both commands get errors on line 1. Please gurus...HELP! Thanx in
>advance, I know this is simple...my book sucks!!!!
>mailto:kcgrimes_at_erols.com

it should work OK. Consider:

$ sqlplus tkyte/tkyte

SQL*Plus: Release 8.0.3.0.0 - Production on Sun Oct 25 18:28:27 1998

(c) Copyright 1997 Oracle Corporation. All rights reserved.

Connected to:
Oracle8 Enterprise Edition Release 8.0.3.0.0 - Production With the Partitioning and Objects options PL/SQL Release 8.0.3.0.0 - Production

SQL> create table sample ( name varchar2(20), address varchar2(30) );

Table created.

SQL> alter table sample modify ( name varchar2(30) );

Table altered.

SQL> Can you cut and paste directly from your session -- the syntax is 100% correct.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sun Oct 25 1998 - 17:32:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US