Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle REFERENCES Clause      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: REFERENCES

Definition:
The REFERENCES clause is used when creating a foreign key constraint. A foreign key must be established using the reference clause, which specifies the column in the parent table.

Example Syntax:

CREATE TABLE table_name
(column1 datatype null/not null,
column2 datatype null/not null,
...
CONSTRAINT fk_column
FOREIGN KEY (column1, column2, ... column_n)
REFERENCES parent_table (column1, column2, ... column_n)
);


The REFERENCES clause can be used when creating a foreign key with either a CREATE TABLE statement or an ALTER TABLE statement.

Note that you cannot establish a foreign key on a global temporary table. Attempting to do so will cause Oracle to issue the ORA-14455 exception: attempt to create referential integrity constraint on temporary table.
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 213 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?