How to Describe a Table in SQL Server
There are 3 methods through which we can describe a table in SQL Server:
- Using sp_help
- Using sp_columns
- Using
INFORMATION_SCHEMA
Views
Let’s set up an environment
To understand how we can get the describe a table SQL Server, we will consider the table Customer as shown below:
CustomerID |
CustomerName |
City |
State |
Age |
---|---|---|---|---|
1 |
Rohit Kumar |
Kolkata |
West Bengal |
31 |
2 |
Kavya Mehra |
Delhi |
Delhi |
34 |
3 |
Amit Singh |
Bangalore |
Karnataka |
25 |
4 |
Anjali Singh |
Mumbai |
Maharashtra |
28 |
SQL Server Describe Table
SQL Server is a widely used Relational Database Management System (RDBMS) that allows users to create and manage databases effectively. When working with databases in SQL Server it is essential to understand the schema of the tables present in the database. Describing a table means getting information about the structure and metadata of the table. In this article, we will learn how to describe a table in SQL Server.