title: How To Refresh Data Dictionary in Oracle?
body: <p>i deleted some of my tables in oracle</p>
  
  <pre><code>DROP TABLE hr.admin_emp CASCADE CONSTRAINTS;
  </code></pre>
  
  <p>but the primary key constraint of deleted table is still in data dictionary (all_constraints). now my question is how to update data dictionary so it does not show primary key of deleted tables? for example i used this query to select the hr schema:</p>
  
  <pre><code>SELECT A.TABLE_NAME,A.COLUMN_NAME,A.CONSTRAINT_NAME FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS B WHERE B.OWNER='HR' AND A.OWNER='HR'AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME AND B.constraint_type='P';
  </code></pre>
  
  <p>and the result is:</p>
  
  <pre><code>REGIONS                        REGION_ID
  COUNTRIES                      COUNTRY_ID
  LOCATIONS                      LOCATION_ID
  DEPARTMENTS                    DEPARTMENT_ID
  JOBS                           JOB_ID
  EMPLOYEES                      EMPLOYEE_ID
  JOB_HISTORY                    EMPLOYEE_ID
  JOB_HISTORY                    START_DATE
  BIN$rRfAMUTnQROvBfuhBCT6RQ==$0 ID
  BIN$87Rd5FE7Rj2eQbim0H2EzA==$0 PK_B
  BIN$bQeeD0M/QMSpLzYjZqAGeA==$0 PK_A
  BIN$RzMu6nZiQ2yuj+4xQf7eAQ==$0 PK_A
  </code></pre>
  
  <p>rows with weird table name are the ones the i had deleted.</p>