Oracle: SQL*Plus - Two-column Primary key constraint  

Example | Description

 

 

A statement that creates a table with two-column primary key constraint

Example # 1

 

CREATE TABLE employee

     ( EmpID number (10),

     Emp_Name varchar2 (30) NOT NULL,

      ProjectId number (10),

       Primary Key (EmpID,ProjectID )

Fig. 1.10

 

Description:

  • The create table statement (as shown in figure 1.10) creates a table based on the column definitions

  • One or more constraints can be assigned to a column or to the entire table

  • Each column must have a unique name and must be assigned a data type

ORACLE - PL/SQL

Database - SQL* PLUS - Primay key (1 column)
Database - SQL* PLUS - Crete TABLE
Database - SQL* PLUS - For Loops
Database - SQL* PLUS - Primary key (two-column)
Oracle PL/SQL - Procedures
Database - SQL* PLUS - Simple Loop
Database - SQL* PLUS - While Loops


   

 

 

 

 

 

 

 

 

Custom Search
 

Home      Disclaimer      Advertise      Contact      Privacy Policy     

Copyright © 2004-10 Paked.com. All rights reserved.

Note: Site best viewed at 1024 x 768 or higher screen resolution