SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Table Exist in MS-SQL

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Ottawa, Canada
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table Exist in MS-SQL

    How can I check for the existence of a table within an MS-SQL database. At present I'm using a count wrapped in a try. This is fine if the table doesn't exist, or the table does exist and it's small. I'm sure I read of an Exist() function, does anyone know of it.

    Colin

  2. #2
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,453
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    do a query on INFORMATION_SCHEMA (see Books OnLine)
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •