title: How to disable a constraint in Oracle with select statement as constraint name
body: <p>I try to disable a constraint attached to a column in a table</p>
  
  <pre><code>ALTER TABLE
     ADV_TEST_COURSE_CREDIT
  DISABLE constraint
  
  name = (SELECT 
      constraint_name
  from
      user_constraints natural join 
      user_cons_columns
  where 
      table_name = 'ADV_TEST_COURSE_CREDIT' AND 
      column_name = 'SEQUENCE_NUMBER' AND
      constraint_type = 'C');
  </code></pre>
  
  <p>I try the statement above. It is not working. Any idea on how to make it work.</p>
  
  <p>Table <code>ADV_TEST_COURSE_CREDIT</code> exists in dev, UAT, Production, so the constraint name is different, but it is all attached a column called <code>SEQUENCE_NUMBER</code></p>