Child pages
  • JDBC Snippets

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Using default port for PostgreSQL example

...

DatabaseDriver class nameJDBC URL ExampleJDBC URL Linksvalidation Query recommendation
Apache Derbyorg.apache.derby.jdbc.EmbeddedDriver
jdbc:derby:[subsubprotocol:]MYDATABASE
Derby JDBC database connection URL 
MySQLcom.mysql.jdbc.Driverjdbc:mysql://myserver:3306/MYDATABASEConnector/J ReferenceSELECT 1
MS SQL Servercom.microsoft.sqlserver.jdbc.SQLServerDriverjdbc:sqlserver://myserver:1433;databaseName=MYDATABASEBuilding the Connection URLSELECT 1
Oracleoracle.jdbc.driver.OracleDriverjdbc:oracle:thin:@myserver:1521:MYTNSOracle JDBC Driver and URL Information (@razorsql.com)SELECT SYSDATE FROM DUAL
PostgreSQLorg.postgresql.Driverjdbc:postgresql://myserver:57405432/MYDATABASE

Connection Parameters

SELECT 1
SQLiteorg.sqlite.JDBCjdbc:sqlite:/var/foo/MYDATABASE.db-