如题,求高手帮忙!

解决方案 »

  1.   

    可以参考正面的语句
    SQL> select b.owner,a.constraint_type,a.table_name,b.column_name
      2   from USER_CONSTRAINTS a, USER_CONS_COLUMNS b
      3  where a.constraint_name = b.constraint_name and a.constraint_type ='P';OWNER  CONSTRAINT_TYPE TABLE_NAME    COLUMN_NAME   
    ------ --------------- ------------- --------------
    HR     P               REGIONS       REGION_ID
    HR     P               COUNTRIES     COUNTRY_ID
    HR     P               LOCATIONS     LOCATION_ID
    HR     P               DEPARTMENTS   DEPARTMENT_ID
    HR     P               JOBS          JOB_ID
    HR     P               EMPLOYEES     EMPLOYEE_ID
    HR     P               JOB_HISTORY   EMPLOYEE_ID
    HR     P               JOB_HISTORY   START_DATE
      

  2.   

    user_constraints, user_cons_columns