drop table c_emp purge;


create table c_emp

as

select * from emp where 1=2;


select * from c_emp;


insert into c_emp

 select *

 from emp;


select * from c_emp;



↓ ↓ ↓


drop table c_emp purge;

select * from c_emp;

create table c_emp

as 

select * from emp;



   cf.) 특정 컬럼만 복사하고 컬럼 이름 변경하여 테이블 생성


drop table p_emp purge;

create table p_emp

as select empno as emp_no, ename, sal as salary, deptno

  from emp;


desc p_emp

select * from p_emp;


+ Recent posts