March 1, 2016

Describing a table in Microsoft SQL

If you would be using Oracle the easiest way to obtain the definition/description of a table is using the "descr [tablename]" SQL command.

However in microsoft such command does not exist, the most similar to Oracle's descr is the stored procedure sp_help, and you can call it as "sp_help [tablename]" or "exec sp_help [tablename]" while using Microsoft SQL Server Studio, and the output you should obtain will be similar to this: