Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • SQL Server : Use of sysobjects table

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 237
    Comment on it

    SQL Server sysobjects Table contains one row for each object created. In other words, it has a row for every constraint, default, log, stored procedure etc in the database.The two columns most useful in this table are sysobjects.name and sysobjects.xtype.

    C: Check constraint

    D: Default constraint

    F: Foreign Key constraint

    L: Log

    P: Stored procedure

    PK: Primary Key constraint

    S: System table

    TR: Trigger

    RF: Replication Filter stored procedure

    U: User table

    UQ: Unique constraint

    V: View

    X: Extended stored procedure

    In the case of triggers, three other columns needed to identify the type of trigger are: deltrig, instrig, and uptrig.

    Using the below query we can get the list all objects of any type :

    SELECT * FROM sysobjects WHERE xtype = <type to search>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: