4. SQL Statements : MODIFY : MODIFY Examples
 
Share this page                  
MODIFY Examples
1. Update table "tab" with data from the staging table "tab_insertions":
MODIFY tab UNION tab_insertions TO COMBINE;
2. Replace all data in table1 with data from table2:
MODIFY table1 UNION table2 EXCEPT table1 TO COMBINE;
3. Add two staging tables to a base table:
MODIFY base UNION stage1 UNION stage2 TO COMBINE;
4. Delete all rows in the sales_fact table and release the space:
MODIFY sales_fact TO TRUNCATED;
5. Modify the table to disable encryption and decryption (which prevents all table access).
MODIFY secrets TO ENCRYPT WITH PASSPHRASE='';
6. Modify the encrypted table to re-enable access.
MODIFY secrets TO ENCRYPT WITH PASSPHRASE='to encrypt or not encrypt, that is the question';
7. Modify the encrypted table's passphrase, and immediate verify and commit the new passphrase.
MODIFY secrets TO ENCRYPT WITH PASSPHRASE='to encrypt or not encrypt, that is the question', NEW_PASSPHRASE='now is the passphrase of our discontent changed';
MODIFY secrets TO ENCRYPT WITH PASSPHRASE='now is the passphrase of our discontent changed';
COMMIT;