dbTalk Databases Forums  

SQL: create(recreate database)

comp.databases comp.databases


Discuss SQL: create(recreate database) in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vertigo
 
Posts: n/a

Default SQL: create(recreate database) - 06-30-2004 , 05:28 AM






Hello
I write some scripts which should create me database named sys.
Is there any sql command: recreate database ?
My script first delete database sys and then create a new one.
But if there is no sys database it fails.

So i need command which could delete me that database if it exist.
How can i do it ?
I use postgresql.

Thanx
Michal


Reply With Quote
  #2  
Old   
Luc
 
Posts: n/a

Default Re: create(recreate database) - 07-01-2004 , 12:05 AM






heu:

Step 1: try to open your DB
Step 2: if error => stop the script
Step 3: if open => delete DB and create DB again


"vertigo" <none (AT) microsoft (DOT) com> a écrit dans le message de
news:cbu4rr$q6u$1 (AT) nemesis (DOT) news.tpi.pl...
Quote:
Hello
I write some scripts which should create me database named sys.
Is there any sql command: recreate database ?
My script first delete database sys and then create a new one.
But if there is no sys database it fails.

So i need command which could delete me that database if it exist.
How can i do it ?
I use postgresql.

Thanx
Michal




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.