Home > Archive > Other Oracle database topics > June 2005 > Creating tables from views ...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Creating tables from views ...
ManChild

2005-06-09, 11:23 am

I was wondering if there was a tool sitting out there anywhere that
would enable me to quickly generate CREATE TABLE statements using the
schema used in a set of views?!

I have an application which is running on several hundred views, I know
want to produce a version using identical tables and yet am feeling
underwhelmed by the time this will take.

I'd rather the scripts over anything as I will need to go back and
insert all those fun foreign keys, indexes and everything else ......

Frank van Bortel

2005-06-09, 1:23 pm

ManChild wrote:
> I was wondering if there was a tool sitting out there anywhere that
> would enable me to quickly generate CREATE TABLE statements using the
> schema used in a set of views?!
>
> I have an application which is running on several hundred views, I know
> want to produce a version using identical tables and yet am feeling
> underwhelmed by the time this will take.
>
> I'd rather the scripts over anything as I will need to go back and
> insert all those fun foreign keys, indexes and everything else ......
>

Learn to sed and/or awk:
s/view/table/g

--
Regards,
Frank van Bortel
Mark D Powell

2005-06-10, 9:23 am

For normal heap tables that you want to look like the result set of a
veiw it would be very easy to generate "create table" statements by
reading the column information in dba_tab_columns.

HTH -- Mark D Powell --

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com