Ask the Expert

Enforcing foreign key constraints across schemas

In Oracle (8i), is it possible to enforce foreign key constraints across schemas (within the same database instance)?
 

    Requires Free Membership to View

Yes, it is possible to have the database enforce a Foreign Key constraint across schemas in the same database instance. To do this, you will need to grant the REFERENCES object privilege to the other schema which will have a foreign key to your schema's table. Something like the following should do the trick:

GRANT references ON my_table TO your_user;

 

For More Information


 

This was first published in April 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: