Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: Primary Key Constraint Jump to:  
Category: >> Oracle PL/SQL >> Primary Key Constraint Bookmark and Share

<< lastnext >>

Snippet Name: Primary Key Constraint

Description: A primary key is a single field or combination of fields that uniquely defines a record. None of the fields that are part of the primary key can contain a null value. A table can have only one primary key.



- In Oracle, a primary key can not contain more than 32 columns.

- A primary key can be defined in either a CREATE TABLE statement or an ALTER TABLE statement.

Also see:
» Check Constraint - Create
» Unique Constraint
» Foreign Key Constraints
» Current_timestamp
» Deferring Constraint Checking
» Add Primary Key Constraint example
» Constraint Checks
» Add constraint example

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 07th, 2009

ALTER TABLE OPS$SQLTIME.CT_ADD_NAMES
DROP PRIMARY KEY
/
 
ALTER TABLE OPS$SQLTIME.CT_ADD_NAMES
ADD CONSTRAINT CT_ADD_NAMES_PK PRIMARY KEY (CT_ID_NO)
USING INDEX 
TABLESPACE CTIDX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (INITIAL 4096K NEXT 512K MINEXTENTS 1 MAXEXTENTS 100 PCTINCREASE 0 FREELISTS 1)
/


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 104 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?