Posted By

ezerick on 06/23/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


SQL Server 2005 - All Cols in all Tables in a DB


 / Published in: SQL
 

URL: http://snipplr.com/developer/

  1. SELECT tab.name AS TableName, col.name AS ColumnName
  2. FROM sys.TABLES AS tab
  3. JOIN sys.COLUMNS AS col ON tab.object_id = col.object_id
  4. ORDER BY tab.name, col.name

Report this snippet  

You need to login to post a comment.