Skip site navigation (1) Skip section navigation (2)

Re: SQL statement to copy a result set to create

From: "Devinder K Rajput" <Devinder(dot)Rajput(at)ipaper(dot)com>
To: ycnyon(at)pd(dot)jaring(dot)my
Cc: pgsql-novice(at)postgresql(dot)org, pgsql-novice-owner(at)postgresql(dot)org
Subject: Re: SQL statement to copy a result set to create
Date: 2002-11-12 19:33:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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



                    "YC Nyon"                                                                                               
                    <ycnyon(at)pd(dot)jaring(dot)my>         To:     pgsql-novice(at)postgresql(dot)org                                       
                    Sent by:                      cc:                                                                       
                    pgsql-novice-owner(at)post       Subject:     Re: [NOVICE] SQL statement to copy a result set to create    
                               another table.                                                           
                    11/11/2002 08:14 PM                                                                                     

I want to create a new table based on an earlier result set from a SQL
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.


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

pgsql-novice by date

Next:From: Giovanni Alexander Briceño RiverosDate: 2002-11-12 20:01:14
Subject: I need help
Previous:From: Rory Campbell-LangeDate: 2002-11-12 17:51:33
Subject: Re: return column id from insert

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group