...

Altering table.

saeed
12-01-2005, 03:24 PM
i want to alter a table by adding a not null constraint in one the attribute.

table name = customer

custid varchar2(10) ~Primary Key~
custname varchar2(15)
custsname varchar2(15)
custadd varchar2(40)

the table is already created but "custname" should not be left blank.
I want to know how can i alter table and add not null constraint in custname attribute.

Thanks.

Saeed.

GJay
12-01-2005, 08:35 PM
ALTER TABLE customer ALTER COLUMN custname SET NOT NULL

But this will depend on what database you're using...and if there are any null entries at the moment, it won't work



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum