Skip to Content
0
Apr 24, 2018 at 04:37 PM

Change DB field length

157 Views Last edit Apr 24, 2018 at 04:38 PM 2 rev

Hi all,

We hace a custom table with a field type CHAR 1.

The domain of this field has values from 1 to 9.

Now we need to add a new value.

So we have to options:

- Use a letter; A, B... The easiest option. But visually... its strange to see numbers and then a letter...

- Increase the length.

---

I've tried to increase the lenght with a test table changing the CHAR by NUMC 2 and Alpha in the domain and the data was converted well.

---

The problem is that the real table has millons of entries.

It's not a key field but it has secondary indexes with this field and this field is used in a lot of programs, classes, etc

We have also archived data of this table.

---

The question is: Do you recommend to increase the lenght? Or use a letter instead?

We have constants created in one class with all the values and we always (I guess) use this constants to compare in the programs. So changing the value of this constants this is not a problem.

Thanks in advance.