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


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  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

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.