Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: recovering the create string for index or table?
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
+---------------------------------------------------------------| 2. SQL Link for XL => Integrate Oracle with XL
| 1. SQL PlusPlus => Add power to SQL Plus command line
+---------------------------------------------------------------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.
![]() |
![]() |