Jodi Kanter wrote:
>Can field specific defaults easily be added to a table that is already
>in existence and has data in it? I cannot seem to locate the correct
>ALTER command in any of my books.
$ psql -c "\h alter table" | grep -iC 1 default
ALTER TABLE [ ONLY ] name [ * ]
ALTER [ COLUMN
Jodi Kanter wrote:
> Can field specific defaults easily be added to a table that is
> already in existence and has data in it? I cannot seem to locate the
> correct ALTER command in any of my books.
ALTER TABLE a ALTER COLUMN b SET DEFAULT c;
--
Peter Eisentraut
http://developer.postgresql.org/
On Wed, 2004-07-14 at 17:34, Jodi Kanter wrote:
> Can field specific defaults easily be added to a table that is already
> in existence and has data in it? I cannot seem to locate the correct
> ALTER command in any of my books.
ALTER TABLE table ALTER COLUMN column SET DEFAULT expression
--
Oli
Can field specific defaults easily be added to a table that is already
in existence and has data in it? I cannot seem to locate the correct
ALTER command in any of my books.
Thanks
Jodi
--
___
Jodi L Kanter
BioInformatics Da