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

Home -> Community -> Usenet -> c.d.o.server -> Re: fix table. HOW TO?

Re: fix table. HOW TO?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Thu, 8 Jul 1999 14:39:04 +0200
Message-ID: <7m262l$2oe$1@news3.saix.net>


Vadim Grepan wrote in message <7lvfop$ltb$1_at_storm.comstar.ru>...
>
> I've in my table (record) some fields, which I want to delete. I know how
>update fields (e.g. increse or change type), but I don't know how delete
>they permanent, with useless data?

Two methods.

  1. Use the ALTER TABLE command to add new/correct columns to the table and the run an UPDATE to populate the new columns with the right values. HOWEVER - you can not remove the incorrect columns. For that you need ... <see 2>
  2. Re-create the table using CREATE TABLE (correct columns specified) UNRECOVERABLE AS SELECT (incorrect columns with format functions and so on) FROM oldtable.

Both these commands are described in the SQL Manual if you need the exact syntax.

regards,
Billy Received on Thu Jul 08 1999 - 07:39:04 CDT

Original text of this message

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