Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: view create table statements
Mark Cudworth wrote:
>
> All of the information you need is in the system views. I wrote a Perl
> program a while ago that does just this. Invoking it (for a table named
> "tracks") as:
>
If you had 9i, you could save yourself a lot of trouble writing Perl by using DBMS_METADATA. For instance (connected as sysdba):
SQL> select dbms_metadata.get_ddl('VIEW', 'V_$SESSION') 2 from dual;
DBMS_METADATA.GET_DDL('VIEW','V_$SESSION')
CREATE OR REPLACE FORCE VIEW "SYS"."V_$SESSION" ("SADDR", "SID",
"SERIAL#", "
Regards,
Sean
Received on Fri Mar 15 2002 - 12:27:20 CST