title: How to discover the underlying primary (or unique) key columns from an Oracle view
body: <p>I was wondering whether there is a possibility for me to discover the underlying primary (or unique) key columns for all tables involved in an Oracle view. Here's an example to show what I mean:</p>
  
  <pre><code>CREATE TABLE t_a (
    id number(7),
    primary key(id)
  );
  
  CREATE VIEW v_a AS
  SELECT * FROM t_a;
  </code></pre>
  
  <p>So by naming convention, I know that <code>v_a.id</code> is actually the primary key column of the underlying <code>t_a</code> table. Is there any way of formally discovering this information by using system views, such as <code>SYS.ALL_CONSTRAINTS</code>, <code>SYS.USER_CONSTRAINTS</code>, etc?</p>
  
  <p>N.B:</p>
  
  <ul>
  <li>The constraints are <strong>NOT</strong> on the view, but on the underlying table.</li>
  <li>I'm not interested in the keys themselves, but in the columns of the view.</li>
  </ul>