简体   繁体   中英

Can I safely drop my table from schema 1?

oracle

In schema AI created a table called "apples" with data.

In Schema BI created a copy of table "apples" from schema 1 using

create table apples as select * from schemaA.apples

My question is, now that I have schema B up and running. Can I drop/delete my schemaA.apples? There is no direct link between the tables correct?

Or if I drop schemaA.apples will schemaB.apples get runied?

There is no direct link between the tables correct?

Correct. You have two different tables, that are not related. You just copied data from one table to another at a given point in time.

Or if I drop schemaA.apples will schemaB.apples get runied?

No, there is no risk that it will impact the other table. Again, data was copied, and tables are independent.

Side note: the create table... as select... syntax (aka CTAS ) just copies the data and the structure, but not the related objects like primary keys, constraints, indexes, sequences. You might want to check these objects, and recreate them too to the new schema.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM