Reputation: 127
I have done some queries in a read-only (Oracle/SQL developer) dB where I have absolutely no privileges to create temporary tables or anything else. I want to export the tables resulting of my queries into another db (PostGre/pgAdmin) db in order to be able to do other queries on the result. Is there an easy way to create the columns of my exported tables in the PostGre db using pgAdmin or do I have to create all the columns manually ?
Upvotes: 1
Views: 2080
Reputation: 247123
You could install the Oracle Foreign Data Wrapper in your PostgreSQL database and use IMPORT FOREIGN SCHEMA
to create foreign tables for your Oracle tables.
Then you can use
CREATE TABLE local_table AS SELECT * FROM foreign_table;
to copy the data.
Upvotes: 2