3 PostgreSQL documentation
6 <refentry id=
"SQL-DROPVIEW">
8 <refentrytitle id=
"SQL-DROPVIEW-TITLE">DROP VIEW
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>DROP VIEW
</refname>
15 <refpurpose>remove a view
</refpurpose>
18 <indexterm zone=
"sql-dropview">
19 <primary>DROP VIEW
</primary>
24 DROP VIEW [ IF EXISTS ]
<replaceable class=
"PARAMETER">name
</replaceable> [, ...] [ CASCADE | RESTRICT ]
29 <title>Description
</title>
32 <command>DROP VIEW
</command> drops an existing view. To execute
33 this command you must be the owner of the view.
38 <title>Parameters
</title>
42 <term><literal>IF EXISTS
</literal></term>
45 Do not throw an error if the view does not exist. A notice is issued
52 <term><replaceable class=
"PARAMETER">name
</replaceable></term>
55 The name (optionally schema-qualified) of the view to remove.
61 <term><literal>CASCADE
</literal></term>
64 Automatically drop objects that depend on the view (such as
71 <term><literal>RESTRICT
</literal></term>
74 Refuse to drop the view if any objects depend on it. This is
83 <title>Examples
</title>
86 This command will remove the view called
<literal>kinds
</literal>:
94 <title>Compatibility
</title>
97 This command conforms to the SQL standard, except that the standard only
98 allows one view to be dropped per command, and apart from the
99 <literal>IF EXISTS<
/> option, which is a
<productname>PostgreSQL<
/>
105 <title>See Also
</title>
107 <simplelist type=
"inline">
108 <member><xref linkend=
"sql-alterview" endterm=
"sql-alterview-title"></member>
109 <member><xref linkend=
"sql-createview" endterm=
"sql-createview-title"></member>