Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NUMBER to VARCHAR2 column conversion
sarah wrote:
>
> Hi,
>
> This may seem like a really stupid question but I need to change the
> datatype in a column in an existing table from NUMBER to VARCHAR2
> datatype. Because the rows in the table aren't null i need another
> method other than alter table modify.... to preserve the existing info
> in the column. What is the best tool to use and why? (and most
> importantly how?) SQLLoader? Direct-Load Insert? Or is there some
> other way around this...
>
> Could you please email replies to me at sarahm_at_vetassess.com.au.
>
> Thanks in advance,
>
> sarah
If you're on 8i+ you could add a new column, populate it, drop the old one - otherwise you're best bit is probably create-table-as-select. Other alternatives are masking the the existing column and leaving it there...
hth
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Sat Jul 21 2001 - 16:23:05 CDT
![]() |
![]() |