Board index » delphi » Field name issues

Field name issues


2006-03-29 12:05:23 PM
delphi52
How can I change fieldname for example;
PhoneNo from varchar(20) to varchar(25) without dropping the fields?
 
 

Re:Field name issues

Jeremy Lim writes:
Quote
How can I change fieldname for example;
PhoneNo from varchar(20) to varchar(25) without dropping the fields?


Off the top of my head. If that doesn't work look in the language guide for
alter table for the exact syntax.
alter table <tablename>alter <col>type VarChar(25)
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side. I did not laugh; people who boast of ancestry often have little else
to sustain them. Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply. (RAH)
 

Re:Field name issues

I had try but it come out messages
"This operation is not defined for system tables.
unsuccessful metadata update.
Column FIELD1 from table TABLE1 is referenced in TABLE1WITHTABLEGROUP "
Is it something refer to index or foreign key?
Regards,
Jeremy Lim
"Jeff Overcash (TeamB)" <XXXX@XXXXX.COM>writes
Quote
Jeremy Lim writes:
>How can I change fieldname for example;
>PhoneNo from varchar(20) to varchar(25) without dropping the fields?

Off the top of my head. If that doesn't work look in the language guide
for alter table for the exact syntax.

alter table <tablename>alter <col>type VarChar(25)

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side. I did not laugh; people who boast of ancestry often have little
else
to sustain them. Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply. (RAH)
 

Re:Field name issues

You cannot change the size of a field that is referenced in a foreign
key constraint. You must drop the constraint, change the field size in
both tables then add the constraint again.
--
Bill Todd (TeamB)