Home » SQL & PL/SQL » SQL & PL/SQL » sql+ alter table constraint syntax
sql+ alter table constraint syntax [message #889] Mon, 11 March 2002 06:57 Go to next message
Misty
Messages: 2
Registered: March 2002
Junior Member
I'd like to add a NOT NULL constraint to a column called DESCRIPTION to an existing table called PART. The table is already populated and I'd rather not delete/insert.

Need some help with my syntax:

ALTER TABLE part ALTER COLUMN description
ADD CONSTRAINT not_null not null;

Receive the following: ERROR at line 1:
ORA-01735: invalid ALTER TABLE option
Re: sql+ alter table constraint syntax [message #891 is a reply to message #889] Mon, 11 March 2002 07:14 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
alter table part modify(description VARCHAR2(100) not null)

assuming description is VARCHAR2(100)
Previous Topic: trigger
Next Topic: Length of SUM field
Goto Forum:
  


Current Time: Thu Apr 25 18:24:06 CDT 2024