Re: SQL statement to copy a result set to create

Поиск
Список
Период
Сортировка
Искать

Re: SQL statement to copy a result set to create

От:
"Devinder K Rajput" <Devinder.Rajput@ipaper.com>
Дата:

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"                                                                                               
                             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





FAQ