256th questions, 053256
256. Sales details are being stored on a daily basis in the SALES_2007 table. A large amount of data is
Added to the table daily. To save disk space, you issued the following command:
Alter table sales_2007 compress for all operations;
What wocould be the outcome of this command?
A. It produces an error because data already exists in the table.
B. It produces an error because compression can be enabled at table creation only.
C. It compresses all data added or modified henceforth but the existing data in the table is not
Compressed immediately.
D. It immediately compresses all existing data as well as new data, resulting from either fresh additions or
Modifications to existing data.
Answer:C
You specify table compression withCOMPRESSClause ofCREATE TABLEStatement. You can enable compression for an existing table by using these clses inALTER TABLEStatement.In this case, only data that is inserted or updated after compression is enabled is compressed. Similarly, you can disable table compression for an existing compressed table withALTER TABLE...NOCOMPRESSStatement. In this case, all data that was already compressed remains compressed, and new data is inserted uncompressed.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.