Oracle Database - Objects

> Database > Oracle Database

1 - 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.

Advertising

3 - List

Advertising

4 - Type

4.1 - Non-Schema

4.2 - Schema

5 - 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;
Advertising
db/oracle/object.txt · Last modified: 2017/09/06 22:18 by gerardnico