DBA > Job Interview Questions > DERBY Java Database FAQs

SQL Tips - Retrieving the Database Connection UR

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

SQL Tips - Retrieving the Database Connection URL

Derby does not have a built-in function that returns the name of the database. However, you can use DatabaseMetaData to return the connection URL of any local Connection.

/* in java */
String myURL = conn.getMetaData().getURL();

(Continued on next question...)

Other Job Interview Questions