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: recovering the create string for index or table?

Re: recovering the create string for index or table?

From: M. Armaghan Saqib <munshi8_at_yahoo.com>
Date: Tue, 18 Jan 2000 02:40:20 -0800
Message-ID: <1bf56ec8.e5161a6b@usw-ex0106-045.remarq.com>


Use my SQL PlusPlus (freeware) to get DDL for any database object.

For example:

SQL> exec s.gettab('emp')
| DROP TABLE scott.emp;
|
| CREATE TABLE scott.emp(
| empno NUMBER(4,0) NOT NULL
| ,ename VARCHAR2(10) NULL
| ,job VARCHAR2(9) NULL
| ,mgr NUMBER(4,0) NULL
| ,hiredate DATE NULL
| ,sal NUMBER(7,2) NULL
| ,comm NUMBER(7,2) NULL
| ,deptno NUMBER(2,0) NULL
| );

PL/SQL procedure successfully completed.

SQL> exec s.getpro('GIVE_RAISE')
| CREATE OR REPLACE
| procedure give_raise (
| p_deptno in number,
| p_raise_percent in number )
| as
| begin
| update emp set sal = sal + (sal * p_raise_percent * .01)
| where deptno p_deptno;
|
| commit;
| end give_raise;
| /

PL/SQL procedure successfully completed.

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/
+---------------------------------------------------------------
ferhat haydar <ferhat_at_sorry.com> wrote in message news:<85uhpe$21aq$2_at_si05.rsvl.unisys.com>...
> Does anybody know what is the documented way to
> recover the original SQL statement which was used to create a table or
> index?
>
> Say I know that there is an index called DUMMY.
> How can I programatically recover the string that created it?
>
> Thanks in advance.


Received on Tue Jan 18 2000 - 04:40:20 CST

Original text of this message

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