Re: Reordering a table - Mailing list pgsql-general

From Howard Cole
Subject Re: Reordering a table
Date
Msg-id 4D63FD66.1060907@selestial.com
Whole thread Raw
In response to Re: Reordering a table  (Vibhor Kumar <vibhor.kumar@enterprisedb.com>)
List pgsql-general
On 22/02/2011 5:18 PM, Vibhor Kumar wrote:
> If you are using PG 8.4 then you can try something with row_number as
> given below:
>   select id,stamp, row_number() over(order by stamp) from test;
>
> Or
>
> Create table test1 as select row_number() over(order by stamp) as id, stamp from test;
>
> Thanks&  Regards,
> Vibhor Kumar
>
I have not come across that that function before. I'll take a closer look.

Many thanks to all for the quick responses.

Howard.

pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: Reordering a table
Next
From: Ralph Smith
Date:
Subject: EXECUTE of a 'create table' string is not happening