ESU_1 is the Source table
create table ESU_1
(
emp_id NUMBER(10),
emp_name VARCHAR2(100)
);
I created a table ESU_2 by using ESU_1
create table ESU_2
as
select * from ESU_1 t
where t.emp_id>20;
When I used below query to get table definition
select dbms_metadata.get_ddl('TABLE', 'ESU_2','SNAPREP') from dual;
I got this o/p
CREATE TABLE ESU_2
( EMP_ID NUMBER(10),
EMP_NAME VARCHAR2(100)
);
But I want the exact table definition that is
create table ESU_2
as
select * from ESU_1 t
where t.emp_id>20;
How can I get this?