-
greenplum.jar 官方驱动 JDBC下载
资源介绍
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();
}
}
- 上一篇: 优化定义-ORACLE+SQL性能优化(全)
- 下一篇: Greenplum_日常维护手册.doc