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

preg_replace question
Hello!!

I hope someone can help me with preg_replace.

I load two tables from an extern

Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLAN

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

$GPRMC and NMEA how to extract from report
Hi There,

Im a little bi lost and not sure where to start with this one, ive got a small gps

Multiple arrays inside data
Hi,

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

please help me... my password gets encrypted but not able to get in database
hai guys,
please help me... in the following function my password gets encrypted but no

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

Count on multidimensional array
Hi, i got an array as below:

Array
(
=> Array
(

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

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