Remove extra
authorBruce Momjian
Thu, 13 Oct 2005 02:00:09 +0000 (02:00 +0000)
committerBruce Momjian
Thu, 13 Oct 2005 02:00:09 +0000 (02:00 +0000)
doc/src/sgml/ref/copy.sgml

index 34f1b496ebf0425d3e9fafc68d4c3f4c776f488f..5461924b3682815d00382c5145a5f937db84c240 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -708,6 +708,18 @@ COPY country FROM '/usr1/proj/bray/sql/country_data';
 
   
 
+  
+   To copy into a file just the countries whose names start with 'A'
+   using a temporary table which is automatically deleted:
+
+BEGIN;
+CREATE TEMP TABLE a_list_COUNTRIES AS
+    SELECT * FROM country WHERE country_name LIKE 'A%';
+COPY a_list_countries TO '/usr1/proj/bray/sql/a_list_countries.copy';
+ROLLBACK;
+
+  
+
   
    Here is a sample of data suitable for copying into a table from
    STDIN: