A primary key of a table can be used for linking the table
to another table.
About this task
To create a primary key for a table:
- Start IBM® InfoSphere™ Data
Architect and
load the data model.
- Expand the table where you want to add the primary key
and select the column that you want to designate as the primary key.
- In the Properties view, click the Type tab.
- Select Primary key.
- In the Project Explorer view, right-click the table where
you added the primary key and click Generate DDL.
- Make sure to select the following options: Fully qualified
names, CREATE statements, COMMENT ON statements, and IN TABLESPACE
clause.
- Click Next.
- Make sure to select the following options: Check constraint,
Foreign key constraint, Primary key constraint, and Tables.
- Click Next.
- Select Run DDL on server, click Next,
select the data warehouse connection, and click Next.
- When prompted, type the user name and password for the
database connection.
- Click Finish.