Toad World® Forums

How to create a FK in Toad for DA


#1

Hello,

I was trying to create a relationship between two tables.

As I am used to Oracle Sql Developer I was looking for an easy way to declare FK.
I tried to use ER Diagram option but it does not allow me to define relationship except dragging field on top of corresponding field in other table.

I would appreciate any suggestions.

Chris
toad.jpeg


#2

The ER Diagram will show existing foreign keys if they exist. If you want to add one, right click on the table, chooose ‘Alter Table’. When the table editor comes up, click on the ‘Advanced’ button and the advanced features of the table editor will be shown. Click on the constraints tab and add your foreign key. See attached screenshots.

Debbie
ShowContraints.png


#3

The ER Diagram will show existing foreign keys if they exist. If you want to add one, right click on the table, chooose ‘Alter Table’. When the table editor comes up, click on the ‘Advanced’ button and the advanced features of the table editor will be shown. Click on the constraints tab and add your foreign key. See attached screenshots.

Debbie
AddContraint.png


#4

Thank you for your reply.