Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8B0X5765510 for ; Mon, 10 Sep 2001 20:33:05 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f8B0RIO66913 for pgsql-admin@postgresql.org; Mon, 10 Sep 2001 20:27:18 -0400 (EDT) (envelope-from news) From: missive@frontiernet.net (Lee Harr) X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Changing column modifiers? Date: Tue, 11 Sep 2001 00:27:17 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 18 Message-ID: <9njlp5$219s$1@news.tht.net> References: <1000084115.4120.2.camel@tim> Reply-To: missive@hotmail.com X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.0 (FreeBSD) To: pgsql-admin@postgresql.org X-Archive-Number: 200109/71 X-Sequence-Number: 2171 On Mon, 10 Sep 2001 01:25:59 +0000 (UTC), Tim Boring : > Can you change a column modifier after you've created the table? For > example, I have a table called "authors" with the following columns: > authorid, authorfirstname, authorlastname, authormi, statecode, country, > born, deceased. > > When I created the table, I forgot to make the "authorfirstname" and > "authorlastname" columns NOT NULL. I've looked at ALTER TABLE but I > don't see a way to use it to add NOT NULL...maybe I'm just missing the > obvious? > How about creating a new table as you like it, then selecting the data from the old table into the new one dropping the old table and renaming the new one? Roundabout, but might be useful.