Re: SQL statement to copy a result set to create another table

From: "YC Nyon" <ycnyon(at)pd(dot)jaring(dot)my>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SQL statement to copy a result set to create another table
Date: 2002-11-14 03:05:50
Message-ID: 005d01c28b8c$fdedfd30$5340baca@gis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I want to create a new table based on an earlier result set from a SQL
query.
For example;
Query 1:
Select * from test where id >20

This will give me a result that 10 records found.
I would like to create a new table and insert these 10 records.
Also, I looking into views. would that be a better choice. The application
let users store their data via PHP.

Thanks
Nyon

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jules Alberts 2002-11-14 15:27:21 Re: SQL statement to copy a result set to create another table
Previous Message Chris Smith 2002-11-13 22:31:02 Re: Describe a table