# Resizing Table Columns

**URL:** <https://forum.servoy.com/t/resizing-table-columns/8611>\
**Category:** Classic Servoy\
**Created:** [January 16, 2008, 1:39am UTC](https://forum.servoy.com/t/resizing-table-columns/8611 "2008-01-16T01:39:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 16, 2008, 1:39am UTC](https://forum.servoy.com/t/resizing-table-columns/8611/1 "2008-01-16T01:39:02Z")

</div>

Newbie question. New to Servoy and SQL (from FoxPro background).

How do you resize a table column (say from 20 characters to 50 characters) without losing data? In FoxPro, you simply changed the table structure. How is this done in SQL?

Thanks!

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [January 16, 2008, 7:53am UTC](https://forum.servoy.com/t/resizing-table-columns/8611/2 "2008-01-16T07:53:58Z")

</div>

Servoy does not support resizing columns other than via dropping and recreating columns which clears the data in the column.

If the database used supports it, you can modify the column width using sql directly in the database. After a restart of developer, Servoy will pick up the new column size.

Rob

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 16, 2008, 4:44pm UTC](https://forum.servoy.com/t/resizing-table-columns/8611/3 "2008-01-16T16:44:19Z")

</div>

Thanks for the quick reply and the tip, Rob. The tip will fix my current situation.

It’s too bad Servoy does not allow table column resizing. Our current product is based on FoxPro (we’re currently converting to Servoy), and one of FoxPro’s features is that you can resize table columns dynamically and programmatically without loss of data when going from smaller to larger column sizes. So, whenever we changed table strutures, it was included as part of our product’s update program.

Can anyone recommend a method (or methodology) for programatically expanding SQL table columns without loss of data across various SQL database back-ends (how are others doing this)? I apologize for asking what is probably a lame question, but I am new to SQL and am looking for guidance in this area.

Thanks!

---

<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 16, 2008, 10:46pm UTC](https://forum.servoy.com/t/resizing-table-columns/8611/4 "2008-01-16T22:46:36Z")

</div>

Hi,  
we use the rawSQL plugin for that.  
with every update (that contains table structure changes) we fire once an update SQL query!

Hope this helps

---

<div class="post-metadata">

**Author:** ![rodneysieb](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@rodneysieb](https://forum.servoy.com/u/rodneysieb)\
**Post date:** [January 16, 2008, 11:44pm UTC](https://forum.servoy.com/t/resizing-table-columns/8611/5 "2008-01-16T23:44:19Z")

</div>

Hi

Almost all back end tools will allow you to resize table columns, change number types etc. without losing any data, just that servoy doesn’t allow you to do it within the servoy app. On restart of Servoy it will pick up the changes you have made.
