2 doc/src/sgml/ref/drop_view.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPVIEW">
8 <refentrytitle>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>:
89 </programlisting></para>
93 <title>Compatibility</title>
96 This command conforms to the SQL standard, except that the standard only
97 allows one view to be dropped per command, and apart from the
98 <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</>
104 <title>See Also</title>
106 <simplelist type="inline">
107 <member><xref linkend="sql-alterview"></member>
108 <member><xref linkend="sql-createview"></member>