Examples showing how to create a table:
1. CREATE TABLE EMP
(
EmpID number not null Primary key,
EmpName Varchar2(50)
);
2. CREATE TABLE EMP
(
EmpId Number(9) Not Null,
EmpNmae Varchar2(50),
CONSTRAINT EmpIdPk Primary Key (EmpId)
);
3. CREATE TABLE EMP
(
EmpId Number(9) Not Null,
EmpName Varchar2(50),
CONSTRAINT EmpIdPk Primary Key (EmpId)
USING INDEX TABLESPACE Indexes;
);
4. CREATE TABLE EMP
(
EmpID number not null Primary key,
EmpName Varchar2(50)
) TABLESPACE Users;
5. CREATE INDEX EmpIdIdx
ON EMP(EmpId);
6. ALTER INDEX EmpIdIdx
RENAME TO NewEmpIdIdx;
);