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

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

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

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

Problem with creating FI documents
Hi, Experts!

when i create Fi doc. with standart transaction, i ve been had such problem

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

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