SQL> desc emp;
Name Null? Type
------------------------------- -------- ----
EMP_ID NUMBER(3)
EMP_NAME VARCHAR2(15)
EMP_SAL NUMBER(6)
SQL> create table emp_bkp as select * from emp;
Table created.
SQL> drop table emp;
Table dropped.
SQL> alter table emp_bkp add (emp_dept number(30));
Table altered.
SQL> desc emp_bkp;
Name Null? Type
------------------------------- -------- ----
EMP_ID NUMBER(3)
EMP_NAME VARCHAR2(15)
EMP_SAL NUMBER(6)
EMP_DEPT NUMBER(30)
SQL> create table emp as select
2 emp_id,
3 emp_name,
4 emp_dept,
5 emp_sal from emp_bkp;
Table created.
SQL> desc emp;
Name Null? Type
------------------------------- -------- ----
EMP_ID NUMBER(3)
EMP_NAME VARCHAR2(15)
EMP_DEPT NUMBER(30)
EMP_SAL NUMBER(6)
No comments:
Post a Comment