Ofek Ron
Ofek Ron

Reputation: 8580

how to Create if not exists a new Java DB?

 conn = DriverManager.getConnection("jdbc:derby:mydatabase;create=true",props);

will this line make my DB get overwritten everytime i execute it? if it will how do i create the DB once and just use it ever since?

Upvotes: 5

Views: 2162

Answers (1)

Shawn D.
Shawn D.

Reputation: 8125

What you are doing will work with Derby. It will create the database if it doesn't exist and do nothing if it already does exist.

Upvotes: 5

Related Questions