Thread: ALERT column

ALERT column

From
Rado Petrik
Date:
Hi , 


I have column dt_created  type "timestamptz"

and I need set default value  "now()"  in exist database. No new !!

This example is not good .

ALTER TABLE user ALERT COLUMN dt_created SET DEFAULT=now();

Thanks.

Rado.



Re: ALERT column

From
Richard Huxton
Date:
On Tuesday 29 Apr 2003 10:14 am, Rado Petrik wrote:
> Hi ,
>
>
> I have column dt_created  type "timestamptz"
>
> and I need set default value  "now()"  in exist database. No new !!
>
> This example is not good .
>
> ALTER TABLE user ALERT COLUMN dt_created SET DEFAULT=now();

Correct syntax is:
ALTER TABLE user ALTER COLUMN dt_created SET DEFAULT now();

See the SQL Commands reference chapter in the manual for full details.

--  Richard Huxton