惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
C
Check Point Blog
I
InfoQ
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
月光博客
月光博客
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
Y
Y Combinator Blog
博客园 - Franky
博客园_首页
罗磊的独立博客
量子位
美团技术团队
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Martin Fowler
Martin Fowler
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏

博客园 - 蕭慶蘋

pymssql调用sqlserver存储过程带output 参数 数据库锁 oracle instr,substr 截取字符串 循环读取写入表 Oracle For 循环,字符串拼接,查找 Putty PSCP iis,webservice 启用 acrobat.exe 打印 iis,webservice 打印 Oracle查询包,同义词 sqlserver 游标 Oracle 截取字符串,取系统时间 Sqlserver连接Oracle数据库 Java 连oracle 12C 起步_PreparedStatement powershell excel 导入 sqlserver 更改存储过程的所有者 jquery-autocomplete 参数说明 了解SQL Server触发器及触发器中的事务 经典SQL语句大全 事务使用
Java 连oracle 12C 起步
蕭慶蘋 · 2015-11-30 · via 博客园 - 蕭慶蘋
package javaapplication2;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class JavaApplication2 {
    
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("oracle.jdbc.driver.OracleDriver");
        String url="jdbc:oracle:thin:@//10.98.0.62:1521/wdpis";
        Connection conn=DriverManager.getConnection(url,"qu","query");
        Statement stmt=conn.createStatement();
        
        ResultSet rs=stmt.executeQuery("select item_no,batch_no,seq_no from dt_out_att ");
        while(rs.next()){
            System.out.print("Item_NO:"+rs.getString("item_no"));
            System.out.print("Batch_NO:"+rs.getString("batch_no"));
            System.out.println("Seq_NO:"+rs.getString("seq_no"));
        }
        rs.close();
        stmt.close();
        conn.close();
    }
    
}

posted @ 2015-11-30 11:08  蕭慶蘋  阅读(828)  评论()    收藏  举报