Re: Populate unique column with default value - Mailing list pgsql-sql

From Jon Horsman
Subject Re: Populate unique column with default value
Date
Msg-id 4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com
Whole thread Raw
In response to Re: Populate unique column with default value  ("Rodrigo De Le�" <rdeleonp@gmail.com>)
List pgsql-sql
> On 10/1/07, Jon Horsman <horshaq@gmail.com> wrote:
> > ... Is there an elegant way i can set the username
> > to be the extension of the current row ...
>
> UPDATE usertable
> SET username = extension
> WHERE username IS NULL;

Hmm, that simple eh, don't I feel stupid =)

Thanks a ton for the quick response.

Jon.


pgsql-sql by date:

Previous
From: "Rodrigo De Le�"
Date:
Subject: Re: Populate unique column with default value
Next
From: Enrico Weigelt
Date:
Subject: Finding broken regex'es