Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Be responsible for your future
Enter the USA legally!

Visa, Green Card, Citizenship, Passport
Consultation Services








Oracle » DDL » Design »

Creating constraints

     





/* primary key constraint */

ALTER TABLE EMPLOYEE (
CONSTRAINT EMP_PK
PRIMARY KEY (EMP_ID)
);

ALTER TABLE REPORT_FORMAT
ADD CONSTRAINT PK_REPORT_FORMAT PRIMARY KEY(REPORT_ID)
USING INDEX TABLESPACE PROD_IDX_01;


/* foreign key constraint */

ALTER TABLE EMPLOYEE ADD (
CONSTRAINT EMP_LOC_ASSIGN_FK
FOREIGN KEY (EMP_ID,
LOC_CD)
REFERENCES LOC_REGISTRY (
EMP_ID,
LOC_CD)
);









Oracle : Related Topics

Oracle : DDL : Creating a table
Oracle : DDL : Creating indexes
Oracle : DDL : Creating and using a sequence
Oracle : DDL : Synonyms and Database Links
Oracle : DDL : Changing a column's type or name
Oracle : DDL : Partitioned Tables
Oracle : DDL : Alter a column
Oracle : DDL : Creating an index with the nosort option
Oracle : DDL : Oracle data types

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2019 Stoltenbar Inc All Rights Reserved.