ili
ili

Reputation: 139

Oracle SQL Developer - using foreign keys

First of, this is a pretty basic question but I cant seem to find a basic tutorial on how to use the software.

If i have a table named COUNTRY with the field region_id and then another table named REGION with a primary key as region_id.

I want to set the region_id field in COUNTRY table as a foreign key. Are the following steps correct?

![enter image description here][1] Am I doing it correctly? if not, where am i going wrong

Upvotes: 3

Views: 1169

Answers (2)

Ian Carpenter
Ian Carpenter

Reputation: 8626

I cant seem to find a basic tutorial on how to use the software.

Have you looked at the Oracle Learning Library for SQL Developer tutorials?

If you search for: Getting Started with Oracle SQL Developer 4.0 you will find a tutorial that gets you up and running SQL Developer, this tutorial includes how to create Foreign Key Constraints.

Upvotes: 0

Mureinik
Mureinik

Reputation: 311163

Yes, This is the correct procedure.

If you want your foreign key to have additional behavior (e.g., ON DELETE CASCADE), you can use the "on delete" drop-down in the wizard.

Upvotes: 2

Related Questions