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: URGENT!!! How can I drop a column???

Re: URGENT!!! How can I drop a column???

From: Patrick Hamou <patrick_hamou_at_hotmail.com>
Date: 2000/03/21
Message-ID: <e9zB4.56685$e53.2151482@news20.bellglobal.com>#1/1

If you have Oracle 8i
there is the option to drop a column...

good luck !

Patrick Hamou,
Oracle DBA

M. Armaghan Saqib <armaghan_at_yahoo.com> wrote in message news:8b5kj1$ied$1_at_nnrp1.deja.com...
> Using SQLPlusPlus (freeware) you could generate a script to alter a
> table to
> your heart's content.
>
> For example to alter DEPT table, we could generate the following script.
>
> SQL> EXEC S2.BLDALT('DEPT','SCOTT')
> | ----------------------------------------------------------------------
> ----
> -
> | ALTER TABLE scott.dept DROP CONSTRAINT sys_c0014552;
> |
> | DROP INDEX scott.sys_c0014552;
> |
> | RENAME dept TO dept_old1234;
> | CREATE TABLE scott.dept(
> | deptno NUMBER(2,0) NOT NULL
> | ,dname VARCHAR2(14) NULL
> | ,loc VARCHAR2(13) NULL
> | )
> | PCTFREE 10
> | PCTUSED 40
> | INITRANS 1
> | MAXTRANS 255
> | TABLESPACE system
> | STORAGE(INITIAL 102400
> | NEXT 102400
> | PCTINCREASE 1
> | MINEXTENTS 1
> | MAXEXTENTS 300);
> |
> | INSERT INTO scott.dept(
> | deptno,
> | dname,
> | loc)
> | SELECT
> | deptno,
> | dname,
> | loc FROM scott.dept_old1234;
> |
> | ALTER TABLE scott.dept ADD CONSTRAINT
> | sys_c0014552 PRIMARY KEY (
> | deptno
> | );
> |
> | CREATE INDEX scott.sys_c0014552 ON SCOTT.DEPT(
> | deptno
> | )
> | PCTFREE 10
> | INITRANS 2
> | MAXTRANS 255
> | TABLESPACE system
> | STORAGE(INITIAL 102400
> | NEXT 102400
> | PCTINCREASE 1
> | MINEXTENTS 1
> | MAXEXTENTS 300);
> |
> | GRANT DELETE ON scott.dept TO public;
> | GRANT INSERT ON scott.dept TO public;
> | GRANT SELECT ON scott.dept TO public;
> | GRANT UPDATE ON scott.dept TO public;
>
> PL/SQL procedure successfully completed.
>
> SQL> SPOOL OFF
>
> regards,
> M. Armaghan Saqib
> +---------------------------------------------------------------
> | 1. SQL PlusPlus => Add power to SQL Plus command line
> | 2. SQL Link for XL => Integrate Oracle with XL
> | 3. Oracle CBT with sample GL Accounting System
> | Download free: http://www.geocities.com/armaghan/

 +---------------------------------------------------------------

> | SQLPlusPlus now on http://www.ioug.org/
> | "PL/SQL package that extends SQL*Plus to another dimension.
> | Contains a PL/SQL code generator and set of extremely useful
> | utilites with extensive documentation." IOUG Web Site
> +---------------------------------------------------------------
>
> Emilie Carton <emilie_carton_at_hotmail.com> wrote in message
> news:8aq654$2rm$1_at_fe1.cs.interbusiness.it...
> > how can I drop a single column from a table without losing the whole
 my
> > dates?
> > I tried to do with using:
> > sql> alter table "table name " drop "column name";
> > but it answers me back "missing keyword"...
> > How can I solve this problem?
> >
> > Thanks a lot
> > Emilie
> >
> >
> >
> >
>
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Mar 21 2000 - 00:00:00 CST

Original text of this message

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