Eine Einführung in
If you have access to the SQL code which created the table the primary key can be seen easily. The primary key may be specified in one of two ways:
CREATE TABLE cia (name PRIMARY KEY, population INTEGER)or, where the primary key is composite:
CREATE TABLE casting(movieid INTEGER, actorid INTEGER, PRIMARY KEY (movieid, actorid) )If this is not possible then implementation specific commands may work.
|Specific to Oracle|
|We can use the system tables: all_constraints and all_cons_columns. For a primary key the constraint_type is 'P'. We also need the all_cons_columns view to find the actual columns.|