On Fri, 2002-10-18 at 22:12, Vivek Khera wrote:
> ALTER TABLE msg_owner ADD COLUMN user_optional_fields VARCHAR(255);
> ALTER TABLE msg_owner ALTER user_optional_fields SET DEFAULT '';
> UPDATE msg_owner SET user_optional_fields = '';
>
> Now my problem is I cannot find any syntax for ALTER TABLE ADD
> CONSTRAINT to put a NOT NULL constraint on a column. Can someone help
> me here?
An additional thought to what [EMAIL PROTECTED] said:
BEGIN;
ALTER TABLE msg_owner ADD CONSTRAINT chk_msg_owner_usr_opt_flds_null
CHECK(user_optional_fields IS NOT NULL);
COMMIT;
HTH
Johannes Lochmann
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])