All Forums Database
Vga 12 posts Joined 02/12
16 Feb 2012
Significance of MaxLength column

What is the significance of MaxLength column in HELP TABLE command in TD? In my case, I could see the value as 4 for an Integer column. While I select the max (column_name) from table, the o/p comes as 1234567 i.e. more than 4 in length...

Help me with that ...

ulrich 816 posts Joined 09/09
16 Feb 2012

Max number of bytes used to store the values

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

addsmiles 13 posts Joined 01/12
16 Feb 2012

As you would know Max(Column_name) will give you the maximum value present for that column in the table.

MaxLength is different from max function. It indicates the number of bytes used for storage of the particular datatype. For example Integer data types needs 4 bytes of storage.

MaxLength for other commonly used data types is as follows:

- Integer Date (4)

- CHAR (N, where N < 256)





- DOUBLE (8)

- DECIMAL (1, 2, 4 or 8)

Hope this helps!


Stefans 38 posts Joined 02/12
16 Feb 2012

Integer data type requires 4 bytes.The data value range is from -2,147,483,648 to 2,147,483,647



You must sign in to leave a comment.