From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. 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..5fab888 --- /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