
2、创建数据库连接如下:


不用的数据库对应不同的驱动,如下图:
|
数据库 |
驱动 |
数据库url |
|
mysql |
com.mysql.jdbc.Driver |
jdbc:mysql://host:port/{dbname}?allowMultiQueries=true |
|
oracle |
org.postgresql.Driver |
jdbc:postgresql:{dbname} |
|
PostgreSQL |
oracle.jdbc.driver.OracleDriver |
jdbc:oracle:thin:user/pass@//host:port/service |
|
MSSQL |
com.microsoft.sqlserver.jdbc.SQLServerDriver 或者 net.sourceforge.jtds.jdbc.Driver |
jdbc:sqlserver://IP:1433;databaseName=DBname 或者 jdbc:jtds:sqlserver://localhost:1433/"+"library"
|

4、添加察看结果树,查看结果

原文:http://www.cnblogs.com/MLing/p/6842700.html