Hi friends
Is there any query to get the list of database, sp and tables
thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gaurish KumarPosted Dec 31, 2009, 3:31 AM
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
Purushottam RathorePosted Dec 31, 2009, 6:31 AM
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
Sanjay ChauhanPosted Dec 31, 2009, 6:18 AM
for your valuable answers.
Pankaj RanaPosted Dec 31, 2009, 5:55 AM
Use Database_Name
Select * from sysobjects where type='u'