文件名称:greenplum.jar 官方JDBC驱动
文件大小:1.52MB
文件格式:ZIP
更新时间:2020-11-29 12:03:57
greenplum
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class Greenplum { public static void main(String args[]) throws Exception{ Class.forName("com.pivotal.jdbc.GreenplumDriver"); Connection db = DriverManager.getConnection("jdbc:pivotal:greenplum://192.168.139.128:5432;DatabaseName=postgres", "gpadmin", "gpadmin"); Statement st = db.createStatement(); ResultSet rs = st.executeQuery("SELECT * FROM test01 limit 100"); while (rs.next()) { System.out.println(rs.getString(1)); } rs.close(); st.close(); } }
【文件预览】:
greenplum_jdbc
----greenplum.jar(1.72MB)