groovy - db2 jdbc 연결 기본 예제
Computer/IT/JAVA 2009/10/07 18:49 | import groovy.sql.Sql
class A {
static void main(String[] args) {
def sql = Sql.newInstance("jdbc:db2://아이피:50000/데이터베이스명", "아이디","비밀번호", "com.ibm.db2.jcc.DB2Driver")
sql.eachRow("select * from TABLENAME "){
println it.컬럼명 + " ${it.컬럼명}"
}
}
}
심플
'Computer/IT > JAVA' 카테고리의 다른 글
| myBatis multi db vendor support (0) | 2011/12/07 |
|---|---|
| Cannot create a server using the selected type (0) | 2010/06/23 |
| groovy - db2 jdbc 연결 기본 예제 (0) | 2009/10/07 |
| Java jconsole 설정 (0) | 2009/08/20 |
| ibatis / spring / all jdbc / SQL Logger (0) | 2009/06/15 |
| AMChart to PNG file - JFreeChart Library use... (0) | 2008/09/11 |

댓글을 달아 주세요