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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Alter column size

RE: Alter column size

From: Alex Hillman <alex_hillman_at_physia.com>
Date: Fri, 15 Dec 2000 10:48:40 -0500
Message-Id: <10711.124718@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C066AE.7F02DEF0
Content-Type: text/plain;

        charset="iso-8859-1"

You can also add column to current table instead of another table, move data to that column, modify existing column and copy data from a new column to modified column using
update <table name> set old_column=new_column and the drop new column.

Alex Hillman

-----Original Message-----
From: Joseph S. Testa [mailto:teci_at_oracle-dba.com] Sent: Friday, December 15, 2000 7:51 AM
To: Multiple recipients of list ORACLE-L Subject: Re: Alter column size

you can increase usually with no problem but to shrink you'll need to pull the data out to another table,null the column, reset the size and push the data back, just be ready for "value too large for column" errors.

Joe
John Dunn wrote:
>
> Can I alter a column size without recreating a table?
>
> Oracle version is 8.0
>
> John
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: John Dunn
> INET: john.dunn_at_sefas.co.uk
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Joe Testa  http://www.oracle-dba.com
No you can't fix an ORA-600 error, call Oracle Support.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Joseph S. Testa
  INET: teci_at_oracle-dba.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

------_=_NextPart_001_01C066AE.7F02DEF0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>RE: Alter column size</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>You can also add column to current table instead of =
another table, move data to that column, modify existing column and =
copy data from a new column to modified column using</FONT></P>

<P><FONT SIZE=3D2>update &lt;table name&gt; set =
old_column=3Dnew_column</FONT>
<BR><FONT SIZE=3D2>and the drop new column. </FONT>
</P>

<P><FONT SIZE=3D2>Alex Hillman</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Joseph S. Testa [<A =
HREF=3D"mailto:teci_at_oracle-dba.com">mailto:teci_at_oracle-dba.com</A>]</FON=
T>
<BR><FONT SIZE=3D2>Sent: Friday, December 15, 2000 7:51 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: Re: Alter column size</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>you can increase usually with no problem but to =
shrink you'll need to</FONT>
<BR><FONT SIZE=3D2>pull the data out to another table,null the column, =
reset the size and</FONT>
<BR><FONT SIZE=3D2>push the data back, just be ready for &quot;value =
too large for column&quot;</FONT>
<BR><FONT SIZE=3D2>errors.</FONT>
</P>

<P><FONT SIZE=3D2>Joe</FONT>
<BR><FONT SIZE=3D2>John Dunn wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Can I alter a column size without recreating a =
table?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Oracle version is 8.0</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; John</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; --</FONT>
<BR><FONT SIZE=3D2>&gt; Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>&gt; --</FONT>
<BR><FONT SIZE=3D2>&gt; Author: John Dunn</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; INET: john.dunn_at_sefas.co.uk</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Fat City Network Services&nbsp;&nbsp;&nbsp; -- =
(858) 538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>&gt; San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2>&gt; =
--------------------------------------------------------------------</FO=
NT>
<BR><FONT SIZE=3D2>&gt; To REMOVE yourself from this mailing list, send =
an E-Mail message</FONT>
<BR><FONT SIZE=3D2>&gt; to: ListGuru_at_fatcity.com (note EXACT spelling =
of 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>&gt; the message BODY, include a line containing: =
UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=3D2>&gt; (or the name of mailing list you want to be =
removed from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>&gt; also send the HELP command for other =
information (like subscribing).</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Joe Testa&nbsp; <A =
HREF=3D"http://www.oracle-dba.com" =
TARGET=3D"_blank">http://www.oracle-dba.com</A></FONT>
<BR><FONT SIZE=3D2>No you can't fix an ORA-600 error, call Oracle =
Support.</FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Joseph S. Testa</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: teci_at_oracle-dba.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =
538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed =
from).&nbsp; You may</FONT>
Received on Fri Dec 15 2000 - 09:48:40 CST

Original text of this message

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