Skip to end of metadata
Go to start of metadata

Overview

ALTIBASE HDB View is similar to Oracle's one. The majority of ALTIBASE HDB syntax includes Oracle syntax.

ALTIBASE HDB does not support views listed below.

  • view constraints
  • updatable view
  • editioning view
  • object view
  • XMLType View (not support XML type)
  • materialized view

The comparison of each clause regarding view

ORACLE

ALTIBASE HDB

Comments

WITH READ ONLY

WITH READ ONLY

 

WITH CHECK OPTION

 

guarantees that inserts and updates result in tables that the defining
table subquery can select.

FORCE|NO FORCE

FORCE|NO FORCE

This functionality will be provided in ALTIBASE HDB V7.




Icon

The materialized view functionality will be provided in ALTIBASE HDB V7.


Example

ORACLE

ALTIBASE HDB

Comments

CREATE OR REPLACE VIEW emp_view AS
SELECT last_name, salary*12 annual_salary
FROM employees
WHERE department_id = 20;

CREATE OR REPLACE VIEW emp_view AS
SELECT last_name, salary*12 annual_salary
FROM employees
WHERE department_id = 20;

 

CREATE VIEW emp_sal (emp_id, last_name,
email UNIQUE RELY DISABLE NOVALIDATE,
CONSTRAINT id_pk PRIMARY KEY (emp_id)
RELY DISABLE NOVALIDATE)
AS SELECT employee_id, last_name, email
FROM employees;

CREATE VIEW emp_sal

AS SELECT employee_id, last_name, email
FROM employees;

 

The statement on the left side creates a
restricted view of the sample table employees and
defines a unique constraint on the email view column
and a primary key constraint for the view on the emp_id
view column

CREATE VIEW clerk AS
SELECT employee_id, last_name, department_id, job_id
FROM employees
WHERE job_id = 'PU_CLERK'
or job_id = 'SH_CLERK'
or job_id = 'ST_CLERK'
WITH CHECK OPTION;

CREATE VIEW clerk AS
SELECT employee_id, last_name, department_id, job_id
FROM employees
WHERE job_id = 'PU_CLERK'
or job_id = 'SH_CLERK'
or job_id = 'ST_CLERK';

You cannot
subsequently insert a new row into clerk
if the new employee is not a clerk.

  • No labels