Some very useful Oracle scripts

xiaoxiao2021-03-06  15

1) Remove the field to the field without affecting the data in the existing table:

Alter Table Employee Rename Column Name To Name1;

2) Modify the field type without affecting the data in the existing table (must comply with the conversion rules):

ALTER TABLE RES_RESOURCE_INF MODIFY (Memo Varchar2 (1024));

3) Query the size of the remaining tablespace (for daily check, prevent the table space):

SELECT TABLESPACE_NAME, SUM (BYTES) / 1024/1024 MB from DBA_Free_Space Group by TableSpace_name;

转载请注明原文地址:https://www.9cbs.com/read-46087.html

New Post(0)