Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: modify datatype with data?
I had thought of that. Unfortunately I want to change the datatypes of my
primary keys...
Thanks,
_Am
Sybrand Bakker wrote:
> So the usual way to resolve this is
> - create an extra table consisting of the primary key of the source
> table and the affected column(s)
> - insert into select ... from source table
> - update source table set affected column = NULL
> - alter table source table modify...
> - update source table
> set affected column =
> (select affected column
> from extra table
> where extra table.primary key = source table.primary key)
>
> commit
>
> And that is basically all!
>
> Regards
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Thu Mar 21 2002 - 14:11:12 CST
![]() |
![]() |