Oracle drop column and unused column

I have one table called test that has 3 columns:

  • Name
  • ID
  • address

After some time, I know that one column is not used. I want to delete one column, say id .

Oracle has one option to identify a column as unused . What is the difference between drop column and unused column?

+4
source share
3 answers

When you drop a column, it moves to the basket, and when you mark an unused column, it logically discards it, but physically saves it.

Sometimes marking a column as unused and then using the argument to use an unused column called alter table name is useful because it allows the database administrator to quickly and immediately select access to the columns. Later, during the current database maintenance session or after a working day, you can delete the column using the unused alter table table rename column to free up space.

On the other hand, labeling an unused column will not make up space, and when you need to free up space and remove unnecessary columns, you better discard it.

+6
source

This is a matter of convenience, actually ...

see here

the “not used” setting is like a reset, but will allow you to defer the actual physical deletion to a later date.

+1
source

This will help in the DBA maintenance window not for your overall use. For the developer, this means the DROP column. what it is, no recovery later indicates. instead, if you are at 12 s, use the INVISIBLE option.

0
source

All Articles