Finding Database name
-
Hi, I am creating a procedure in which I want to check that if a database is already exists then drop the database and create the new database and if the database is not exist then just create the database. How can I do this. Plz help me.... Thanks in Advance Alok...
-
Hi, I am creating a procedure in which I want to check that if a database is already exists then drop the database and create the new database and if the database is not exist then just create the database. How can I do this. Plz help me.... Thanks in Advance Alok...
You can check database existence like this: if exists (select * from sys.databases where name = 'demo') // database exists, drop it and create new else // database doesn't exist so just create it
#region signature my articles #endregion
-
You can check database existence like this: if exists (select * from sys.databases where name = 'demo') // database exists, drop it and create new else // database doesn't exist so just create it
#region signature my articles #endregion
-
You are welcome :)
#region signature my articles #endregion