Returns the defined length of a column.
COL_LENGTH('table', 'column')
int
This example finds the length of the title column in the titles table. The x gives a column heading to the result.
USE pubs
SELECT COL_LENGTH('titles', 'title') AS x
Here is the result set:
x
------
80
(1 row(s) affected)
Expressions | Metadata Functions |