About

Database object.

Each database object is considered to either be:

See for plsql object type: PL/SQL - Object datatype

Object in different namespace are allowed to have identical names.

List

Type

Non-Schema

Schema

See Oracle Database - Schema Object

Creation

  • In line
create table employees
(
   emp_id    number primary key,
   emp_name  varchar2(30)
)
  • Out of line. Excepted for the NOT NULL constraint
create table employees
(
   emp_id    number,
   emp_name  varchar2(30)
   constraint emp_id_pk primary key (emp_id)
)
  • Alter
create table employees
(
   emp_id    number,
   emp_name  varchar2(30)
);
alter table employees modify emp_id constraint emp_id_pk primary key;