Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT!!! How can I drop a column???
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/
+---------------------------------------------------------------> | Contains a PL/SQL code generator and set of extremely useful
> | SQLPlusPlus now on http://www.ioug.org/
> | "PL/SQL package that extends SQL*Plus to another dimension.
![]() |
![]() |