In this article we will see how to get the Database objects Information using a query.
What are database objects?
- Views
- Tables
- Stored Procedure etc.
Helpful information available:
- Object
- Type
- Type_desc
- Schema_id and also we have more info in that table.
Step 1: Gets the complete information of database Views under the used Database:
use AdventureWorks
select * from sys.views
Step 2: Output of Sys.views:
Step 3: Gets the complete information of database Tables under the used Database:
use AdventureWorks
select * from sys.tables
Step 4: Output of Sys.tables:
Step 5: Gets the complete information of database Procedures under the used Database:
use AdventureWorks
select * from sys.procedures
Step 6: Output of Sys. procedures:
Step 7: Gets the complete information of database Objects under the used Database:
use AdventureWorks
select * from sys.objects
Step 8: Output of Sys.objects:
Thanks for reading this article. Have a nice day.

Gaurav GuptaPosted Apr 25, 2012, 12:00 AM
Hello, I want to get all the triggers information that are associated with a specified with a table, How?
Lajapathy ArunPosted Apr 23, 2012, 7:06 AM
Sorry,Don't know about factory method.
Lajapathy ArunPosted Apr 23, 2012, 7:05 AM
You can get information of database using select * from sys.databases use dbname or id to filter
Arjun PanwarPosted Apr 22, 2012, 11:54 PM
Hi, I want to know that what is factory method design pattern?
Arjun PanwarPosted Apr 22, 2012, 11:49 PM
Hi, I want to know that how to get information about a specified database or about all Adaptive Server databases.