Hi friends
Is there any query to get the list of database, sp and tables
thanks in advance
Database queries
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Gaurish Kumar108 reputationPosted Dec 30, 2009, 10:31 PM EST
try this
Sql Queries for getting the list of tables and Stored Procedure.
For Tables:
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
For Stored Procedure:
Select [NAME] from sysobjects where type = 'P' and category = 0
For Views:
Select [NAME] from sysobjects where type = 'V' and category = 0
Pankaj RanaRank #2,270 · 620 reputationPosted Dec 31, 2009, 12:55 AM EST
Use Database_Name
Select * from sysobjects where type='u'
Sanjay Chauhan55 reputationPosted Dec 31, 2009, 1:18 AM EST
for your valuable answers.
Purushottam RathoreRank #120 · 18.2K reputationPosted Dec 31, 2009, 1:31 AM EST
follow this link to find stored procedure and tables from the database.
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=65048
To find all stored procedure of the database:
select * from sys.objects where type='p'
To find all tables of the database:
select * from sys.objects where type='u'
To find stored procedure and tables of the database:
select * from sys.objects
To find list of database:
select name from master..sysdatabases