Thursday, May 26, 2011

Create Table in Oracle

1. Simple Create table
CREATE TABLE Employee
(
Id INT ,
Name VARCHAR2(100)
);

2. Create table with primary key
CREATE TABLE Employee
(
Id INT primary key ,
Name VARCHAR2(100)
);

3. Create table with primary key constraint
CREATE TABLE Employee
(
Id INT NOT NULL,
Name VARCHAR2(100),
CONSTRAINT pk_Emploee_Id PRIMARY KEY (Id)
);

No comments: