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.
Printable View
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.
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')
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.