jdbc中调用oracle存储过程
1、创建表:
create table stud(
sid int,
sname varchar2(50)
)
并插入一条数据
insert into stud values(1,'Tom')
2、创建存储过程
--创建存储过程
create or replace procedure pro_select_name(
v_sid in stud.sid%type,
v_sname out stud.sname%type
)
--声明区
is
--执行体
begin
select sname into v_sname from stud where sid = v_sid;
--异常处理
exception
when others then
dbms_output.put_line(sqlcode||sqlerrm);
end;
3、jdbc中调用
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Types;
public class TestPro {
public void test(){
Connection con = null;
CallableStatement cst = null;
try{
 
相关文档:
(1)oracle数据库备份的导入对数据库的版本有要求,也即源数据库(导出产生备份的数据库)的版本要和目标数据库(导入数据库)的版本一致,否则可能导致导入失败。
(2)备份中的用户名(数据库导出时所使用的用户)和导入数据库的用户名最好一样,因为用户名和表空间命名有关系,如果不一样,导入就不能一次完成。也就是 ......
Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk1.zip
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk2.zip
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk3.zip
Oracle9i ......
安装:
运行G:\install\setup.exe安装Oracle,但不创建启动数据库
创建数据库(使用Configuration And Migration Tools->DataBase Configuration Assistant)
创建监听程序(使用Configuration And Migration Tools->NetManager或者 Configuration And Migration Tools->Net Configuration Assistant)
创建服务 ......