how can export user tables structure only

Posted on 2004-08-13
Last Modified: 2012-05-05
how can export user tables structure only not data
Question by:rehman_job

Accepted Solution

sapnam earned 20 total points
ID: 11798759
you can use the rows=n parameter

for a table
exp userid=scott/tiger tables=emp rows=n file=c:\emp.dmp

for the user
exp userid=scott/tiger rows=n file=c:\emp.dmp

Expert Comment

ID: 11799193
You can use the same rows=n parameter to avoid exporting table data.
Exp <User> File=<Path> [Tables=(<Names>)] [Rows=N] [Log=<Path>]


Expert Comment

ID: 11806940
my dear friend

its very simple, u can either use the export command or use can use SQL script to generate the table creation script

just dot he following

1. c:\set oracle_sid=<database name>
2. exp
3. follow the steps which is user interactive.

in one of the options it will ask whether table data to be exported. its default value is Y, just change to N.

or using sql u can have ur table creation script. b ut i suggest that u go for the export command which will also include all constraints,triggers if any for a table.

there u r u have the structure alone.


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now