Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create Table Script
declare
begin
for tab in (select table_name from user_tables)
loop dbms_output.put_line(' create table '||tab.table_name||'('); for col in (select column_name,data_type,data_length) from user_tab_columns where table_name = tab.table_name) loop dbms_outputput_line(col.column_Name||' '||col.data_type||' '||col.data_length); end loop; dbms_output.put_line(')'); end loop;
Atta ur-Rehman <atta707_at_my-deja.com> wrote in message
news:8t31lc$8vc$1_at_nnrp1.deja.com...
> hi kian,
>
> you might want to have a look at the EXPort utility of oracle. EXPort
> creates a dump file for specified table(s) in a schema, all the objects
> in a schema or for a full database. in your situation you could use exp
> to export your schema to dump file and IMPort the file at the
> destination source.
>
> otherwise there are some third party tools that help you creat these
> scripts. TOAD being one of them. a freeware and evaluation copy of toad
> could be downloaded from www.toadsoft.com.
>
> HTH,
>
> ATTA
>
> In article <8t2mob$so$1_at_nnrp1.deja.com>,
> Kian Lee <ooiklnews_at_yahoo.com> wrote:
> > How to generate a crete table script from Oracle?
> > Right now I have more than 100 tables that need to be prepare in
script
> > method for distribute to client. And those tables were created from
> > developer since the development, so I have to consolidate them.
> > Therefore is there a easy way to generate a create table script
> > including the constraints as well?
> >
> > For example, in DB2 there is a command db2look.
> >
> > Thanks in advance.
> >
> > Regards,
> > Kian Lee
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> --
>
> getting the meanin' of data...
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Oct 24 2000 - 03:23:12 CDT