Wednesday, July 11, 2012

SQL SERVER – Find the Number of Table in one Database


 
-- select Database name
Use AdventureWorks
Go
-- Find the Number of Talbes
select name , object_id,schema_id,type from sys.tables
Go


Result :

Name
Object Id
Schemaid
Type
mailtest
949578421
1
U
Customer_User_Details
965578478
1
U
Call_Management
1029578706
1
U
User_Call_Management
1125579048
1
U
module_leader_details
1429580131
1
U
nodal_incharge_details
1445580188
1
U
temp
1461580245
1
U
Help_Desk
1749581271
1
U
Cust_Call_Management
1813581499
1
U
call_tracker_management
1893581784
1
U
call_tracker_details
1973582069
1
U
user_header
2021582240
1
U
User_Details
2037582297
1
U
Call_Allocation_Details
2137058649
1
U




Like and Share to SQL Integrity Blog

No comments:

Post a Comment

Thank You !!!!