?? testcallablestatement.java
字號:
package com.allanlxf.jdbc.core;
import java.sql.*;
import com.allanlxf.jdbc.util.ConnectionFactory;
public class TestCallableStatement
{
public static void main(String[] args) throws Exception
{
Connection con = ConnectionFactory.getConnection();
CallableStatement cs = con.prepareCall("{call getAccountOwner(?,?)}");
cs.setInt(1, 2172);
cs.registerOutParameter(2, Types.VARCHAR);
cs.execute();
String accountOwner = cs.getString(2);
System.out.println(accountOwner);
cs.close();
con.close();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -