|
-
Nov 21st, 2003, 08:55 AM
#1
Thread Starter
Addicted Member
Table Exists? [RESOLVED]
Does anyone know how i can check to see if a table exisits in an MS SQL database? I know how to do this with stored procedures but i want to keep everything local to the app.
Last edited by mik706; Nov 21st, 2003 at 09:58 AM.
Mik706
-
Nov 21st, 2003, 09:10 AM
#2
Lively Member
Why would you want to keep everything local to the app? Its best for performance when you do the most db processing on the server.
Anyway the code is
Code:
IF EXISTS(SELECT NAME FROM sysobjects WHERE NAME = 'Your_table')
Last edited by adBSTRD; Nov 21st, 2003 at 12:17 PM.
-
Nov 21st, 2003, 10:01 AM
#3
Thread Starter
Addicted Member
Cheers for that.
I know that it would be better for the performance if i were to use a stored procedure but performance isnt an issue with this and i dont want the DBA to worry about me changing his database.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|