SQL Flow Field Guide

sys.sp_columns

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

spcolumns returns column information for the specified objects that can be queried in the current environment.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Not stated in the Microsoft summary.

Syntax at a glance

sys.sp_columns
    [ @table_name = ] N'table_name'
    [ , [ @table_owner = ] N'table_owner' ]
    [ , [ @table_qualifier = ] N'table_qualifier' ]
    [ , [ @column_name = ] N'column_name' ]
    [ , [ @ODBCVer = ] ODBCVer ]
[ ; ]

Work example

spcolumns returns column information for the specified objects that can be queried in the current environment.

Read the parameter list and identify the provider operation it supports. Do not call it directly from application T-SQL.

Check your work Why does Microsoft limit direct calls to this procedure?

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