1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
16 HREF="sql-commands.html"><LINK
19 HREF="sql-declare.html"><LINK
21 TITLE="DROP AGGREGATE"
22 HREF="sql-dropaggregate.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="sql-declare.html"
60 HREF="sql-declare.html"
73 HREF="sql-dropaggregate.html"
81 HREF="sql-dropaggregate.html"
102 >DELETE -- delete rows of a table</DIV
107 CLASS="REFSYNOPSISDIV"
115 >DELETE FROM [ ONLY ] <VAR
134 > deletes rows that satisfy the
138 > clause from the specified table. If the
142 > clause is absent, the effect is to delete
143 all rows in the table. The result is a valid, but empty table.
153 HREF="sql-truncate.html"
161 > extension which provides a
162 faster mechanism to remove all rows from a table.
170 > will delete rows in the
171 specified table and all its subtables. If you wish to only delete
172 from the specific table mentioned, you must use the
179 > You must have the <TT
182 > privilege on the table
183 to delete from it, as well as the <TT
187 privilege for any table whose values are read in the <VAR
212 > The name (optionally schema-qualified) of an existing table.
222 > A value expression that returns a value of type
226 > that determines the rows which are to be
241 > On successful completion, a <TT
244 > command returns a command
257 of rows deleted. If <VAR
261 0, no rows matched the <VAR
264 > (this is not considered
276 > Delete all films but musicals:
278 CLASS="PROGRAMLISTING"
279 >DELETE FROM films WHERE kind <> 'Musical';</PRE
283 > Clear the table <TT
288 CLASS="PROGRAMLISTING"
289 >DELETE FROM films;</PRE
301 > This command conforms to the SQL standard.
309 SUMMARY="Footer navigation table"
320 HREF="sql-declare.html"
338 HREF="sql-dropaggregate.html"
354 HREF="sql-commands.html"