Suppose I have two Oracle databases. We'll call them database A and database B.
Now suppose I have a table in database A that's defined like this:
CREATE TABLE foo
(
foo_id INT PRIMARY KEY,
some_text VARCHAR2(10),
other_table_id INT
CONSTRAINT some_fk_constraint
FOREIGN KEY (other_table_id)
REFERENCES other_table(other_table_id)
)
...is there any easy way to create this same table in database B with the same primary key and same foreign key, but without any data? It would be ideal if there were a pure SQL method so I can do this in Python with cx_Oracle, but I can launch a shell script if need be.