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: How to shorten a column's length that already HAS data in it?

Re: How to shorten a column's length that already HAS data in it?

From: Raheen Ballard <rballard34_at_home.com>
Date: Mon, 15 Oct 2001 09:14:40 GMT
Message-ID: <4Oxy7.131558$5A3.41450614@news1.rdc2.pa.home.com>


Thx so much everyone that replied...I have plenty of ways to solve my column probs now...have a good one!

--
Check out my site!  (Still under construction!)
http://members.home.net/rballard34/
Sign the guestbook if you like!

-Rah
"Robert Boyle" <rboyle_at_cyantel.com> wrote in message
news:8729a6fe.0110150109.5d4ea5b5_at_posting.google.com...

> Sounds to me like you are using a CHAR field type. I would do two
> things (based on the fact that your original field is CHAR(50):
>
> ALTER TABLE mytable
> MODIFY myfield VARCHAR2(50)
> /
> UPDATE TABLE mytable
> SET myfield = TRIM(myfield)
> /
> COMMIT
> /
>
> ORACLE will pad your field with spaces if you have a CHAR field as the
> field is a fixed length. A VARCHAR2 field is of variable length and
> so is not padded. Should really use these whenever possible.
>
> HTH
> R.
Received on Mon Oct 15 2001 - 04:14:40 CDT

Original text of this message

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