Powered by Blogger.

Saturday, February 15, 2014

Get all tables and stored procedures in sql server 2008




In this post we will discuss about how to get all tables and stored procedures in sql server 2008. Also check out my previous posts on:

- Export gridview data to excel sheet in Asp.net

- Working with enterprise library for data access in asp.net Part-3

- Tutorial on Cookies in asp.net

To get all the tables in a database run below sql statement:

Use TestDB

SELECT NAME AS 'List OF Tables' FROM SYS.TABLES

The result will be shown as shown in the figure below:

To get all the stored procedure in a database run below sql statement:

Use TestDB

SELECT NAME AS 'List OF Stored Procedures' FROM SYS.PROCEDURES

The result will be shown as shown in the figure below:




0 comments

Post a Comment