Re: SQL statement to copy a result set to create - Mailing list pgsql-novice

From Devinder K Rajput
Subject Re: SQL statement to copy a result set to create
Date
Msg-id OFA298AD33.1F8F34F6-ON86256C6F.006B32FE@ipaper.com
Whole thread Raw
List pgsql-novice
I think a view would the better route.  This is because if you write a
query, it will have to be rerun every time before you get the up-to-date
results.  However, with the view, the up-to-date results will always be
available.

regards,

Devinder



    
                    "YC Nyon"
    
                    <ycnyon@pd.jaring.my>         To:     pgsql-novice@postgresql.org
    
                    Sent by:                      cc:
    
                    pgsql-novice-owner@post       Subject:     Re: [NOVICE] SQL statement to copy a result set to
create    
                    gresql.org                     another table.
    

    

    
                    11/11/2002 08:14 PM
    

    

    




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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org






pgsql-novice by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: return column id from insert
Next
From: brew@theMode.com
Date:
Subject: SQL