Get Table and Column Names From SQL Server

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

Category: Sql - 2 comments »

2 Responses to “Get Table and Column Names From SQL Server”

  1. Antonio M.

    Just what I was looking for! :-) Thanks!!!

  2. serdar

    you are welcome Antonio.
    thanks for the comment :)


Leave a Reply



Back to top