Topic: Database Administration >> Tables
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Kaiz |
Posted: Mar 12, 2008 01:01:12 AM |
Total Post: 104
Joined: Sep, 2007
|
Dear Friends
How to copy a structure of table without its data from one user to another user of the same database and from one database user to another database user.....
Thanks & Regards |
|
|
Gitesh |
| Posted: Mar 12, 2008 02:46:33 AM | |
|
Total Post: 322
Joined: May, 2005
|
Hi,
If you have user aaa and table name is abc. Another user name bbb and want to create abc in bbb schema without data then you have 2 options.
1) Take export without rows and import in to another user schema with using touser=bbb fromuser=aaa
2) Login as bbb user and execute following command (select privilege must have of anther aaa user's table abc)
create table abc as select * from aaa.abc where 1=2;
It will create same table structure without data in bbb user schema. Primary key or unique key doesn't reflected in this case.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 815 |
| Mohammed Taj | 704 |
| Jayanta Sur | 479 |
| positive fanatic | 416 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 242 |
| neeraj sharma | 231 |
| Ramesh Jois | 226 |
| Bishal Khetan | 196 |
|
|