![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi! As the subjects says i wish to find out if a spesific database exist in my sql server. I wish to write following statement. if not exists (select * from information_schema.databasename where database_name = 'myDB') Create Database myDB GO But I know i'm missing something.... Please help --------------- Best regards - Hans - --------------- (Have fun programming with ... C#) |
#4
| |||
| |||
|
|
You can query against the sysdatabases table in the Master database to see if a specified database exists on the server. This is how we build our databases if they don't already exist. |
![]() |
| Thread Tools | |
| Display Modes | |
| |