Use stored procedure to check if database exist
Database
4
Posts
2
Posters
0
Views
1
Watching
-
Is there a stored procedure that I can use to check if a database exist before I create it using C#?
If you are using SQL Server 2005 you can write a proc to use select * from sys.databases.
-
If you are using SQL Server 2005 you can write a proc to use select * from sys.databases.
-
I am using SQL Server 2005 Express, is there something similar that I can use to check if a table exists in the database? Thanks.
This will return all of the tables from the db the query is running under... select * from sysobjects where xtype = 'u'