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: desc, oracle, mysql, sqlserver, sp_help
Related posts:
2 Comments
If you’re using SQL Management Studio, you must put the table name between single quotes.
OR just put in the table name without any modifiers – i.e. – gifts, not dbo.gifts. Worked for me, anyway.