If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Not Null To Null

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-03, 01:58
Bhushan_sawant Bhushan_sawant is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Red face Not Null To Null

Hi All,


I have one problem.
We have created one table with not null constraint.
Now I want to alter those columns back to null.
I have fired following syntax but it's not happening...
Can anybody help me out..

1. ALTER TABLE test ALTER COLUMN age DROP NULL;
2. ALTER TABLE test ALTER COLUMN age SET NULL;

Plese reply ASAP.


Regards,

Bhushan Sawant

Last edited by Bhushan_sawant; 11-21-03 at 02:04.
Reply With Quote
  #2 (permalink)  
Old 11-21-03, 06:53
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Not Null To Null

Quote:
Originally posted by Bhushan_sawant
Hi All,


I have one problem.
We have created one table with not null constraint.
Now I want to alter those columns back to null.
I have fired following syntax but it's not happening...
Can anybody help me out..

1. ALTER TABLE test ALTER COLUMN age DROP NULL;
2. ALTER TABLE test ALTER COLUMN age SET NULL;

Plese reply ASAP.


Regards,

Bhushan Sawant
Hi,

create table T1
( age date not null )

alter table T1 modify age date null;

Warning, not use DROP.

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 11-26-03, 05:41
Bhushan_sawant Bhushan_sawant is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks Gustav,

I could achive this by using following ...

--------------------
alter table test modify(function_id integer);
--------------------
1. Don't specify "null" by default it takes null.
2. Specify "not null" to convert from null to not null.

This is to share my experiance with others...

Bhushan Sawant
Reply With Quote
  #4 (permalink)  
Old 11-26-03, 06:34
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Quote:
Originally posted by Bhushan_sawant
Thanks Gustav,

I could achive this by using following ...

--------------------
alter table test modify(function_id integer);
--------------------
1. Don't specify "null" by default it takes null.
2. Specify "not null" to convert from null to not null.

This is to share my experiance with others...

Bhushan Sawant
Hi Bhushan,

Warning:
If the table have constraint the sentence
--------------------
alter table test modify(function_id integer);
--------------------
lost them.

Gustavo.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On