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 > Getting error while adding new column as "type char(1)" in informix 9.4

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-10-09, 22:15
sarwan sarwan is offline
Registered User
 
Join Date: Jun 2006
Posts: 7
Getting error while adding new column as "type char(1)" in informix 9.4

Hi, I am using informix 9.4, I am able to create a new table with column name as "type", I want add a new column as "type char(1)" in the existing table. I tried this using alter table query, but it is not allowing me to alter it. But in informix 7.3 I am able to add new column as "type" using alter table query. if anyone knows the reason please share with me.

Thanks
Sarwan
Reply With Quote
  #2 (permalink)  
Old 11-12-09, 08:33
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
It'd be nice if you posted your full sql, but I'm guessing you don't need the 'type' keyword.

eg.

alter table dropme add ( hello char(1) );

should work.
Reply With Quote
  #3 (permalink)  
Old 11-23-09, 11:41
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
You can't use "type" as a column name because "type" is a reserved word.
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