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{
 
相关文档:
在本教程中,您将使用设置文件配置 Oracle Warehouse Builder 11g 第 1 版 (OWB 11gR1) 的项目环境。然后,您将创建一个 Warehouse Builder 用户并登录。
所需时间
大约 30 分钟
注: OWB 11g 设置脚本的下载说明在本教程稍后部分提供。本教程及其设置脚本仅支持 OWB 11g 第 1 版。该 Oracle 示例教程的早期版本可用于 O ......
视图
创建新表:create table emp2 as select * from emp;
create view empv20 as select empno,ename,job,hiredate,deptno from emp where deptno=20 with check option;
语法:create or replace view 视图名称 as 子查询(修改之后的子查询)
替换视图(修改)
create or replace view empv20 as select empno,ename, ......
移动表所在表空间:
alter table table_name(表名) move tablespace new_tablespace(新表空间)
用户拥有的存储过程:
select object_name from user_objects where object_type='PROCEDURE'; ......
1) 建立序列命令
CREATE SEQUENCE [user.]sequence_name
[increment by n]
[start with n]
[maxvalue n | nomaxvalue]
[minvalue n | nominvalue];
INCREMENT BY: 指定序列号之间的间隔 ......
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 ......