title: dropping unique constraint by name
body: <p>When dropping a unique constraint in Sybase Central, the drop statement shown is as follows;</p>
  
  <pre><code>ALTER TABLE "DBA"."enr_rds_heating_control_validation_t" DROP CONSTRAINT "ASA826";
  </code></pre>
  
  <p>The constraint being dropped here ASA826 comes from the SYS.SYSCONSTRAINT view where the value comes from the constraint_name column.</p>
  
  <p>The issue here is that this is a unique identifier assigned to the constraint by Sybase and is only valid for the current database, so when run against another database this constraint might a) not exist or b) be a different constraint entirely.</p>
  
  <p>When creating the constraint we are naming it however, in this case <code>enr_rds_heating_control_validation_t UNIQUE (enr_rds_heating_type_id,enr_rds_heating_control_id)</code> and this value can be seen in the <code>SYS.SYSINDEX</code> view in the index_name column and this value will remain unique across all of the databases.</p>
  
  <p>I have tried to drop the constraint passing through the index_name in place of the constraint name and receive an error indicating that the constraint is not found.</p>
  
  <p>How do I drop the unique constraint using the index name rather than the constraint name?</p>