This procedure is intended for single column primary key relationships.
First we will create two table functions. The first finds a list of all tables with their primary key columns. The second finds all existing foreign key relationships with their table and column names. Finally we find all tables with primary key column names that do not have an existing foreign key relationship.
To get Table and column name for Primary Keys.
This query will give you the table name and column name on which you have defined the primary key. You can use this to get columns on which the primary key is based. I find it very useful when i need to define the FK relationship for other tables in PowerDesigner. Try to do the […]
2003-04-16
1,638 reads