Desc SQL Tables

When working with Oracle, SQL Server, or MySQL you might need to remind yourself the names of the columns for a table, I know I do. To describe the details of a table you can execute the following from a Oracle or MySQL client.

desc <table_name>

And just like everything else that Microsoft does, SQL Server does not follow the conventions or standards of other vendors and instead uses a different keyword to describe a given table. In SQL Server you display detailed information about a table use the sp_help command.

sp_help <table_name>

If you are interested in listing all the available tables in a database, for either Oracle, SQL Server, or MySQL, then you might want to take a look at the Show SQL Tables post.

Technorati Tags: , , , ,

Related posts:

  1. SQL Server Query Shortcuts
  2. Show SQL Tables
  3. MySQL Admin
  4. Create SQL Server Database and Database Tables From a File
  5. Copy Data Between Two Database Tables

This entry was posted in SQL, TechKnow. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Paula
    Posted April 19, 2009 at 12:52 am | Permalink

    If you’re using SQL Management Studio, you must put the table name between single quotes.

  2. Donna
    Posted October 22, 2009 at 6:05 am | Permalink

    OR just put in the table name without any modifiers – i.e. – gifts, not dbo.gifts. Worked for me, anyway.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*