Re:Find out of object exist

From: Vishal Parkar (vgparkar@hotmail.com)
Date: 03/26/03

  • Next message: Tara: "SQL Server Application DBA Position in Houston, TX"
    From: "Vishal Parkar" <vgparkar@hotmail.com>
    Date: Wed, 26 Mar 2003 14:09:16 -0800
    
    

    IF object_id('northwind..Customers') is not null
    print 'Object exists'
    Else
    print 'Object does not exists'

    --Vishal

    >-----Original Message-----
    >This is probably a simple question but I am rusty..
    >
    >Is there a way I can find out through query analyzer if
    an object exist in
    >the database..
    >
    >Something like...
    >
    >If xp_regread is in master then
    > Write this
    >Else
    > Write this
    >End if
    >
    >Thanks
    >
    >
    >.
    >


  • Next message: Tara: "SQL Server Application DBA Position in Houston, TX"