SQL Flow Field Guide

COL_LENGTH

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

catalog lookup

What changes

Input
catalog metadata (object, column, index, file, database properties)
Output or change
id, name or property value
Return type
smallint

Syntax at a glance

COL_LENGTH ( 'table' , 'column' )

Work example

Read a column's declared byte length in a visible table or view.

Use schema-qualified names and test missing and permission-hidden objects separately.

Check your work Null can mean missing or hidden metadata and does not report a stored value's length.

Open Microsoft Learn for full syntax, permissions, and details for your version.