PL/SQL (MOSC)

MOSC Banner

how to determine if a table has a primary key

edited Jan 30, 2013 4:08AM in PL/SQL (MOSC) 8 commentsAnswered
 I need the primary keys of the below tables
CS_INCIDENTS_ALL_B, CS_INCIDENTS_TYPES_B,
CS_INCIDENT_STATUSES_B,
JTF_TASKS_B, JTF_TASK_STATUSES_B, JTF_TASK_TYPES_B ,
JTF_TASKS_AUDIT_B,
JTF_TASK_TEMP_GROUPS_B, JTF_TASK_TEMP_GROUPS_TL,
JTF_TASK_TEMPLATES_B, JTF_TASK_TEMPLATES_TL,
CUG_SR_TYPE_ATTR_MAPS_VL


I am using the following SQL,with out success.Can any one advice?

 

SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner

FROM all_constraints cons, all_cons_columns cols

WHERE cols.table_name = 'CS_INCIDENTS_ALL_TL'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center