From 311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 16 Apr 2024 21:46:48 +0200 Subject: Adding upstream version 15.4. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/tutorial-delete.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/src/sgml/html/tutorial-delete.html (limited to 'doc/src/sgml/html/tutorial-delete.html') diff --git a/doc/src/sgml/html/tutorial-delete.html b/doc/src/sgml/html/tutorial-delete.html new file mode 100644 index 0000000..d09c58e --- /dev/null +++ b/doc/src/sgml/html/tutorial-delete.html @@ -0,0 +1,34 @@ + +2.9. Deletions

2.9. Deletions

+ Rows can be removed from a table using the DELETE + command. + Suppose you are no longer interested in the weather of Hayward. + Then you can do the following to delete those rows from the table: +

+DELETE FROM weather WHERE city = 'Hayward';
+

+ + All weather records belonging to Hayward are removed. + +

+SELECT * FROM weather;
+

+ +

+     city      | temp_lo | temp_hi | prcp |    date
+---------------+---------+---------+------+------------
+ San Francisco |      46 |      50 | 0.25 | 1994-11-27
+ San Francisco |      41 |      55 |    0 | 1994-11-29
+(2 rows)
+

+

+ One should be wary of statements of the form +

+DELETE FROM tablename;
+

+ + Without a qualification, DELETE will + remove all rows from the given table, leaving it + empty. The system will not request confirmation before + doing this! +

\ No newline at end of file -- cgit v1.2.3