create=true

Function

Creates the standard database specified within the database connection URL Derby system and then connects to it. If the database cannot be created, the error appears in the error log and the connection attempt fails with an SQLException indicating that the database cannot be found.

If the database already exists, creates a connection to the existing database and an SQLWarning is issued.

JDBC does not remove the database on failure to connect at create time if failure occurs after the database call occurs. If a database connection URL used create=true and the connection fails to be created, check for the database directory. If it exists, remove it and its contents before the next attempt to create the database.

Combining with other attributes

You must specify a databaseName (after the subprotocol in the database connection URL) or a databaseName=nameofDatabase attribute with this attribute.

You can combine this attribute with other attributes. To specify a territory when creating a database, use the territory=ll_CC attribute.
Note: If you specify create=true and the database already exists, an SQLWarning is raised.
jdbc:derby:sampleDB;create=true

jdbc:derby:;databaseName=newDB;create=true;
Related reference
bootPassword=key
createFrom=Path
databaseName=nameofDatabase
dataEncryption=true
encryptionKey=<key>
encryptionProvider=providerName
encryptionAlgorithm=algorithm
logDevice=logDirectoryPath
newEncryptionKey= <key>
newBootPassword = <new password>
password=userPassword
restoreFrom=Path
rollForwardRecoveryFrom=Path
shutdown=true
territory=ll_CC
user=userName
(no attributes)