1 Replies - 5230 Views - Last Post: 21 January 2013 - 09:18 PM

#1 sidhu88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 18-January 13

Create constraint

Posted 21 January 2013 - 06:13 PM

how can use constraint in last line of this code, I has composite primary key their


CREATE TABLE invoption
(
   saleinv          CHAR(6)      CONSTRAINT nn_invoption_saleinv NOT NULL 
                                 CONSTRAINT fk_invoption_saleinv REFERENCES saleinv (saleinv),
   ocode            CHAR(4)      CONSTRAINT nn_invoption_ocode NOT NULL
                                 CONSTRAINT fk_invoption_ocode REFERENCES options (ocode),
   saleprice        NUMBER(7,2)  CONSTRAINT nn_invoption_saleprice NOT NULL,
                                  UNIQUE (saleinv, ocode)
 );



Is This A Good Question/Topic? 0
  • +

Replies To: Create constraint

#2 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Create constraint

Posted 21 January 2013 - 09:18 PM

What do you mean by your question? Can you please elaborate on what exactly you want to ask?

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1