sysobjects contains a row for each database object. : sysobjects « System Tables Views « SQL Server / T-SQL Tutorial






type    The type of a database object.
Can be one of the following strings:
C = check constraint;
D = default;
F = foreign key constraint;
L = transaction log;
P = stored procedure;
K = primary key or unique constraint;
R rule;
RF = replication stored procedure;
S = system table;
TR = trigger;
U = user table;
V = view;
X = extended stored procedure

21> select  top 10 * from sysobjects;
22> GO
name                                                                                                                             id          xtype uid    info   status      base_schema_ver replinfo
 parent_obj  crdate                  ftcatid schema_ver  stats_schema_ver type userstat sysstat indexdel refdate                 version     deltrig     instrig     updtrig     seltrig     category
 cache
-------------------------------------------------------------------------------------------------------------------------------- ----------- ----- ------ ------ ----------- --------------- -----------
 ----------- ----------------------- ------- ----------- ---------------- ---- -------- ------- -------- ----------------------- ----------- ----------- ----------- ----------- ----------- -----------
 ------
sysrowsetcolumns                                                                                                                           4 S          4      0           0               0           0
           0 2005-10-14 01:36:06.707       0           0                0 S           1       1        0 2005-10-14 01:36:06.707           0           0           0           0           0           2
      0
sysrowsets                                                                                                                                 5 S          4      0           0               0           0
           0 2005-10-14 01:36:06.690       0           0                0 S           1       1        0 2005-10-14 01:36:06.690           0           0           0           0           0           2
      0
sysallocunits                                                                                                                              7 S          4      0           0               0           0
           0 2005-10-14 01:36:06.690       0           0                0 S           1       1        0 2005-10-14 01:36:06.690           0           0           0           0           0           2
      0
sysfiles1                                                                                                                                  8 S          4      0           0               0           0
           0 2003-04-08 09:13:37.267       0           0                0 S           1       1        0 2003-04-08 09:13:37.267           0           0           0           0           0           2
      0
syshobtcolumns                                                                                                                            13 S          4      0           0               0           0
           0 2005-10-14 01:36:06.707       0           0                0 S           1       1        0 2005-10-14 01:36:06.707           0           0           0           0           0           2
      0
syshobts                                                                                                                                  15 S          4      0           0               0           0
           0 2005-10-14 01:36:06.707       0           0                0 S           1       1        0 2005-10-14 01:36:06.707           0           0           0           0           0           2
      0
sysftinds                                                                                                                                 25 S          4      0           0               0           0
           0 2005-10-14 01:36:06.877       0           0                0 S           1       1        0 2005-10-14 01:36:06.877           0           0           0           0           0           2
      0
sysserefs                                                                                                                                 26 S          4      0           0               0           0
           0 2005-10-14 01:36:06.720       0           0                0 S           1       1        0 2005-10-14 01:36:06.720           0           0           0           0           0           2
      0
sysowners                                                                                                                                 27 S          4      0           0               0           0
           0 2005-10-14 01:36:06.863       0           0                0 S           1       1        0 2005-10-14 01:36:06.863           0           0           0           0           0           2
      0
sysdbreg                                                                                                                                  28 S          4      0           0               0           0
           0 2005-10-14 01:36:06.737       0           0                0 S           1       1        0 2005-10-14 01:36:06.737           0           0           0           0           0           2
      0

(10 rows affected)








27.33.sysobjects
27.33.1.sysobjects contains a row for each database object.
27.33.2.Dropping all the triggers in the database using a cursor and dynamic execution.
27.33.3.Retrieving all of the triggers for each table.
27.33.4.Query sysobjects for user table, not system table
27.33.5.Check the existance of a table by querying sysobjects