Omnidex SQL Function: $COLUMN_LENGTH


The $COLUMN_LENGTH function returns the number of the column in bytes.

$COLUMN_LENGTH should not be confused with $DATA_LENGTH and CHARACTER_LENGTH. CHARACTER_LENGTH returns the number of character in a string column, not including trailing spaces. $DATA_LENGTH returns the number of characters plus the null-terminator for STRING datatypes.

This function returns an INTEGER datatype.


$COLUMN_LENGTH ( column )


Required. The name of a column, qualified by the table and database as needed.


Example 1: Column

> select name, $col_length(name) len from individuals;

NAME                                                LEN
--------------------------------------------------  -----------
MS. MARY LEWIS                                               50
MRS. ALICE R TOLLIVER                                        50
MR. SIDNEY K TOLLIVER                                        50
MRS. JENNIFER J HOPKINS                                      50
MR. CHARLIE HOPKINS                                          50
MS. KIMBERLY BLUE                                            50
KATHLEEN TUCKER                                              50

Additional Resources

See also:

Back to top
dev/sql/functions/column_length.txt ยท Last modified: 2016/06/28 22:38 (external edit)