please use dbms_metadata.get_ddl procedure.

Thanks,