Skip site navigation (1) Skip section navigation (2)

ALTER TABLE SET DEFAULT

From: Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: ALTER TABLE SET DEFAULT
Date: 2002-04-26 07:49:03
Message-ID: 20020426074903.GA13787@raphael (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

I couldn't find the right syntax to add a DEFAULT value for a column in
an existing table. I'm actually workin on a migration from MSSQL to
postgres, and the scripts generated by mssql include such statements as:

alter table contacts  add constraint df_contacts_languageid default (0) for languageid;

How do I convert this to a psql statement? I didn't find an example in
the docs or on google.

Thanks for your help!

Raph

pgsql-novice by date

Next:From: Raphael BauduinDate: 2002-04-26 08:02:53
Subject: answer for: ALTER TABLE SET DEFAULT
Previous:From: AarniDate: 2002-04-26 05:10:47
Subject: Fwd: Strange behaviour

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group