Tag: sql meta


Get Table and Column Names From SQL Server

December 17th, 2008 — 5:33pm

you can get table names from sql server with a simple query

–table names

SELECT * FROM sys.objects WHERE type = 'U'

–column names

SELECT * FROM sys.COLUMNS WHERE OBJECT_NAME(sys.COLUMNS.OBJECT_ID) = 'tblTableName'
  • Facebook
  • Twitter
  • StumbleUpon
  • del.icio.us
  • Digg

2 comments » | Sql

Back to top