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

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

CHECH A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

Users and Groups with PHP Classes
Hi,

I have setup what I hope to be a good working User class. Now I want to introduce group m

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to

php forms and database navigatio
Hello,
I'm new to php and i'd like to post the following.
I have written code to get records f

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{

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