create or replace procedure jcl_droptable(
    p_table in varchar2
) is
    v_count number(10);
begin
select count(*) into v_count from user_tables where table_name = upper(p_table);
if v_count > 0 then
      execute immediate 'drop table ' || p_table ;
end if;
end jcl_droptable;
/

create or replace procedure jcl_dropsequence(
    p_sequence in varchar2
) is
    v_count number(10);
begin
select count(*) into v_count from user_sequences where sequence_name = upper(p_sequence);
if v_count > 0 then
      execute immediate 'drop sequence ' || p_sequence ;
end if;
end jcl_dropsequence;
/

begin
	jcl_droptable('JCL_ORG_SCHEME');
END;
/

begin
	jcl_droptable('JCL_ORG_LEVEL');
END;
/

begin
	jcl_droptable('JCL_ORG_GRADE');
END;
/

begin
	jcl_droptable('JCL_ORG_SEQUENCE');
END;
/

begin
	jcl_droptable('JCL_ORG_POST');
END;
/

begin
	jcl_droptable('JCL_ORG_POST_INFO');
END;
/

begin
	jcl_droptable('JCL_ORG_COMP');
END;
/

begin
	jcl_droptable('JCL_FIELD_EXTENDGROUP');
END;
/

begin
	jcl_droptable('JCL_FIELD_EXTENDTITLE');
END;
/

begin
	jcl_droptable('JCL_FIELD_EXTENDINFO');
END;
/

begin
	jcl_droptable('JCL_ORG_COMPEXT');
END;
/

begin
	jcl_droptable('JCL_ORG_COMPEXT_DT1');
END;
/

begin
	jcl_droptable('JCL_ORG_DEPT');
END;
/

begin
	jcl_droptable('JCL_ORG_DEPTEXT');
END;
/

begin
	jcl_droptable('JCL_ORG_DEPTEXT_DT1');
END;
/

begin
	jcl_droptable('JCL_ORG_JOB');
END;
/

begin
	jcl_droptable('JCL_ORG_JOBDT');
END;
/

begin
	jcl_droptable('JCL_ORG_JOBEXT');
END;
/

begin
	jcl_droptable('JCL_ORG_JOBEXT_DT1');
END;
/

begin
	jcl_droptable('JCL_ORG_HRMRESOURCE');
END;
/

begin
	jcl_droptable('JCL_ORG_HRMRESOURCEEXT');
END;
/

begin
	jcl_droptable('JCL_ORG_HRMRESOURCEEXT_DT1');
END;
/

begin
	jcl_droptable('JCL_ORG_STAFFPLAN');
END;
/

begin
	jcl_droptable('JCL_ORG_STAFF');
END;
/

begin
	jcl_droptable('JCL_ORG_STAFFS');
END;
/

begin
	jcl_droptable('HR_LOG');
END;
/

begin
	jcl_droptable('JCL_ORG_HRMRELATION');
END;
/

begin
	jcl_droptable('JCL_ORG_MAP');
END;
/

begin
	jcl_droptable('JCL_IMPORT_HISTORY');
END;
/

begin
	jcl_droptable('JCL_IMPORT_HISTORY_DETAIL');
END;
/

begin
	jcl_droptable('JCL_INFO');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_SCHEME_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_LEVEL_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_GRADE_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_SEQUENCE_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_POST_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_POST_INFO_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_COMP_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_FIELD_GROUP_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_FIELD_TITLE_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_FIELD_INFO_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_COMPEXT_DT1_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_DEPT_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_DEPTEXT_DT1_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_JOB_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_JOBDT_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_JOBEXT_DT1_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_HRM_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_HRMEXT_DT1_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_STAFFPLAN_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_STAFF_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_STAFFS_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_ORG_MAP_FID');
END;
/

BEGIN
	jcl_dropsequence('HR_LOG_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_IMPORT_HISTORY_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_IMPORT_DETAIL_ID');
END;
/

BEGIN
	jcl_dropsequence('JCL_INFO_ID');
END;
/