title: Oracle unique constraint and primary key not null
body: <p>Can a table have a primary key attribute and a unique constraint to another attribute?</p>
  
  <p>I have the following</p>
  
  <pre><code>CREATE TABLE BRANCH(
  BRA_CODE NUMBER NOT NULL PRIMARY KEY,
  BRA_NAME VARCHAR(15),
  BRA_ADDR VARCHAR(30),
   CITY_ID NUMBER);
  </code></pre>
  
  <p>and im trying to add</p>
  
  <pre><code>ALTER TABLE BRANCH ADD CONSTRAINT UNIQUE_BRANCH_NAME UNIQUE (BRA_NAME);
  </code></pre>
  
  <p>and i get the following error;</p>
  
  <pre><code>ERROR at line 1:
  ORA-02261: such unique or primary key already exists in the table
  </code></pre>