# Can I change a field name?

**URL:** <https://forum.servoy.com/t/can-i-change-a-field-name/957>\
**Category:** Classic Servoy\
**Created:** [January 7, 2004, 5:21am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957 "2004-01-07T05:21:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@chris](https://forum.servoy.com/u/chris)\
**Post date:** [January 7, 2004, 5:21am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/1 "2004-01-07T05:21:12Z")

</div>

Hello - is it possible to change a field name or character limit once I’ve actually started using it? I’m using the standard Firebird database as the backend.

If it’s not possible, could you please tell me how you get around this / deal with it as I’m so used to being able to change names and attributes as needed.

Thank you.

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [January 7, 2004, 7:25am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/2 "2004-01-07T07:25:25Z")

</div>

No you can’t!

You can make a workaround.  
Make a new field (with an other name, and the right properties) and a method which is started the first time the customer opens the solution.

method: make a loop that copies the data from the old to the new field.

This is, as far as I know, the only way to do this, without loosing the data.

---

<div class="post-metadata">

**Author:** ![chris](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@chris](https://forum.servoy.com/u/chris)\
**Post date:** [January 8, 2004, 7:57am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/3 "2004-01-08T07:57:32Z")

</div>

Aha! Found out you can change table names. Just execute an SQL statement like this:

ALTER TABLE table1 ALTER [COLUMN] field1 TO field2;

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [January 8, 2004, 9:34am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/4 "2004-01-08T09:34:44Z")

</div>

Is only possible on 1 or 2 databases, the method described by HJK always works.

---

<div class="post-metadata">

**Author:** ![Bert](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@Bert](https://forum.servoy.com/u/Bert)\
**Post date:** [January 8, 2004, 9:34am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/5 "2004-01-08T09:34:58Z")

</div>

> chris:  
> Aha! Found out you can change table names. Just execute an SQL statement like this:
> 
> ALTER TABLE table1 ALTER [COLUMN] field1 TO field2;

Does it hold the content of the field?

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [January 8, 2004, 10:01am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/6 "2004-01-08T10:01:20Z")

</div>

> Jan Blok:  
> Is only possible on 1 or 2 databases, the method described by HJK always works.

Jan, can you be more specific? What do you mean by 1 or 2 databases?

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [January 8, 2004, 10:11am UTC](https://forum.servoy.com/t/can-i-change-a-field-name/957/7 "2004-01-08T10:11:17Z")

</div>

Firebird and postgress are as far as I know the only 2 databases which support column rename
