DataTamer: SQL Server Services

Entries Tagged as Snippets

List all columns

November 16, 2010 · No Comments

This is a handy bit of code to list all columns in a given table:

SELECT * FROM sys.columns WHERE [object_id] = object_id(N'[dbo].[ibProject]',N'U') ORDER BY [column_id]

Categories: Snippets