import table with dependency


Posted on 16th Feb 2014 07:03 pm by admin

Hi

What is the best way to import table back which has dependency?

SQL> create table test (a number); Table created. SQL> create table test2 (b number); Table created. SQL> alter table test2 add constraint pk_test2 primary key(b); Table altered. SQL> ALTER TABLE test add CONSTRAINT fk_test FOREIGN KEY (a) REFERENCES test2(b); Table altered. exp system/**** file=C:/test2.dmp tables=test2 About to export specified tables via Conventional Path ... . . exporting table TEST2 0 rows exported Export terminated successfully without warnings. Sometime later, I want to import table test2. Inorder to achieve this I need to drop table first and then start import. SQL> drop table test2; drop table test2 * ERROR at line 1: ORA-02449: unique/primary keys in table referenced by foreign keys If I use cascade option, I will lose the foreign key in other table. What should I do in this issue?

No comments posted yet

Your Answer:

Login to answer
68 Like 46 Dislike
Previous forums Next forums
Other forums

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

Just cannot get 'area' to submit to db using same php code as already used
Basically all i have done is just modified some code and added an area section.
The form is allre

Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec

ALV List display - header width adjust
Hi,

I am using REUSE_ALV_LIST_DISPLAY for my ALV display.The width of the ALV varies for

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

Parse multirow HTML table
Hello all,
I have a site I am working on. Its a sports site and I am trying to add stats to a DB

Placing and array within an array then sorting it!
I have a page that runs two large mysql queries and saves the results into arrays, in php I then per

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash