use job
SELECT * FROM sysobjects WHERE (xtype = 'U') -- how many tables the query has
SELECT * FROM sysobjects WHERE (xtype = 'V') -- how many views the query has
SELECT * FROM sysobjects WHERE (xtype = 'P') -- how many stored procedures the query has
Query the tables created by all users in the current database
xtype char(2) Object type. Can be one of the following object types:
C = CHECK constraint
D = default or DEFAULT constraint
F = FOREIGN KEY constraint
L = log
FN = scalar function
IF = inline table function
P = stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication Filter Stored Procedure
S = System Table
TF = Table Function
TR = Trigger
U = User Table
UQ = UNIQUE Constraint (Type is K)
V = View
X = Extended Stored Procedure
C = CHECK constraint
D = default or DEFAULT constraint
F = FOREIGN KEY constraint
L = log
FN = scalar function
IF = inline table function
P = stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication Filter Stored Procedure
S = System Table
TF = Table Function
TR = Trigger
U = User Table
UQ = UNIQUE Constraint (Type is K)
V = View
X = Extended Stored Procedure