Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

 

→      Constraints

 

→      Create

 

→      Change   the   default   constraint   name   as

 

Raak-LEDGER-Master-Pk as constraint   name

 

→      select Primary Key as Constraint Type

 

→      select Record-id in Primary Column 1

 

→      NEXT →      FINISH Script for creating Primary Keys:

Generally these types of the constraints will be created at the time of creating the table itself, If not done, then the table needs to be altered as follows:

"ALTER TABLE RAAK-LEDGER-MASTER  ADD CONSTRAINT  "RAAK-LEDGER-MASTER-PK" PRIMARY KEY ("RECORD-ID")"

For other two tables Table name, constraint name alone need to be changed since in both the tables, record-id is the primary key column,

Go to the Home SQL Workshop SQL Command

 

Window … type

 

ALTER TABLE RAAK-TRANS-MASTER  ADD CONSTRAINT "RAAK-TRANS-MASTER-PK"      PRIMARY       KEY ("RECORD-ID")        CLICK RUN will alter the table