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

Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statem

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane.

Error in query: Resource id #4??
hey guys, having a minor (i think) problem here that i havent been able to figure out. long story sh

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or material

HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to

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