Re: SQL statement to copy a result set to create

Поиск
Список
Период
Сортировка
От Devinder K Rajput
Тема Re: SQL statement to copy a result set to create
Дата
Msg-id OFA298AD33.1F8F34F6-ON86256C6F.006B32FE@ipaper.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: return column id from insert
Следующее
От: brew@theMode.com
Дата:
Сообщение: SQL