Query for Table:
SELECT COUNT(*) AS TABLECOUNT FROM sys.Tables
Query for Store Procedures:
select count(*) as ProceduresCount from sys.procedures
Query for Triggers:
SELECT count(*) AS TriggersCount FROM sys.triggers
Query for Views:
SELECT count(*) AS ViewsCount FROM sys.views
SELECT 'Count' = COUNT(*), 'Type' = CASE type
WHEN
'C' THEN 'CHECK constraints'
WHEN
'D' THEN 'Default or DEFAULT constraints'
WHEN
'F' THEN 'FOREIGN KEY constraints'
WHEN
'FN' THEN 'Scalar functions'
WHEN
'IF' THEN 'Inlined table-functions'
WHEN
'K' THEN 'PRIMARY KEY or UNIQUE constraints'
WHEN
'L' THEN 'Logs'
WHEN
'P' THEN 'Stored procedures'
WHEN
'R' THEN 'Rules'
WHEN
'RF' THEN 'Replication filter stored procedures'
WHEN
'S' THEN 'System tables'
WHEN
'TF' THEN 'Table functions'
WHEN
'TR' THEN 'Triggers'
WHEN
'U' THEN 'User tables'
WHEN
'V' THEN 'Views'
WHEN
'X' THEN 'Extended stored procedures'
END
FROM sys.objects
GROUP BY type
ORDER BY type
Count
|
Type
|
5
|
NULL
|
47
|
NULL
|
3
|
NULL
|
62
|
Default or DEFAULT
constraints
|
33
|
FOREIGN KEY constraints
|
27
|
Stored procedures
|
45
|
System tables
|
1
|
Table functions
|
54
|
User tables
|
1 comment :
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
Best Dot Net Training in Chennai
Selenium Training in chennai | Selenium Coaching Institute in Chennai
Best Software Testing Training Institute in Chennai With Placement | Testing Courses in Chennai
Java Training Institute in Chennai | Core Java Training in Chennai | Java Course and Certification
PHP Course in Chennai
Post a Comment