invantive documentation
Invantive Support ForumsLog In / Sign Up

Drop View Statement (dropViewStatement)

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    dropViewStatement_start((START))
    dropViewStatement_start --> dropViewStatement_0_0['DROP']:::quoted
    dropViewStatement_0_0 --> dropViewStatement_0_1['VIEW']:::quoted
    dropViewStatement_0_1 --> dropViewStatement_0_2[tableIdentifier]
    dropViewStatement_0_2 --> dropViewStatement_end((END))

Purpose

The drop view statement removes a view from the data dictionary. After completion, the view can no longer be used by queries being started.

When using the if exists clause (available from 25.0.41 and 24.0.778), the view is only dropped when a previous version of the identical named view exists.