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?
CREATE TABLE IF NOT EXISTS. If the IF NOT EXISTS clause is used, then the table will only be created if a table with the same name does not already exist. If the table already exists, then a warning will be triggered by default.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With