Checking if a table exists, so that it may be dropped before recreating it
From: Dr Tarheel (anonymous_at_discussions.microsoft.com)
Date: 05/06/04
- Next message: Mike: "Adding Preceeding zeros"
- Previous message: Mike C.: "Numerical Sequencing - filling in the blanks"
- Next in thread: Simon: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Simon: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Gregory A. Larsen: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Trey Walpole: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 14:01:20 -0700
It may be argued that truncating the original and running an INSERT would be more efficient, but I am required to create the table afresh each time. There will be some occasions where the table may be already dropped. If that is the case, I'd like to skip the DROP TABLE command and go straight to the SELECT. I understand I can query sysobjects to determine if the table exists, but what is the most straight forward way to implement this. A code snippet would be a world of help.
Thanks,
Dr Tarheel
- Next message: Mike: "Adding Preceeding zeros"
- Previous message: Mike C.: "Numerical Sequencing - filling in the blanks"
- Next in thread: Simon: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Simon: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Gregory A. Larsen: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Reply: Trey Walpole: "Re: Checking if a table exists, so that it may be dropped before recreating it"
- Messages sorted by: [ date ] [ thread ]